diff options
author | Steve Fung <stevefung@google.com> | 2016-04-19 23:31:36 -0700 |
---|---|---|
committer | Steve Fung <stevefung@google.com> | 2016-04-20 21:42:33 +0000 |
commit | 0e5581ea9e4b54347ee16c8ca3a575ec27d72afd (patch) | |
tree | 77d8905074ff5338b2b63569a3381df82f0530bf | |
parent | 53928b12e7f0daa07cabe0274096f252af8a8589 (diff) | |
download | bdk-0e5581ea9e4b54347ee16c8ca3a575ec27d72afd.tar.gz |
Add pylint preupload hook
Enables the pylint preupload hook. Since the Bdk's main entry
point is not the top-most directory, it adds 'cli/lib' to the
front of the PYTHONPATH. It has to be added to the front, due
to a conflict with pylint's own 'test' module when the Bdk's
modules call 'from test import stubs' or other imports from the
test folder.
Bug: 27926782
Test: Uploading a CL runs pylint.
Change-Id: I4e99868db872fc09151b91ae26724e30a601bacc
-rw-r--r-- | PREUPLOAD.cfg | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/PREUPLOAD.cfg b/PREUPLOAD.cfg new file mode 100644 index 0000000..d434401 --- /dev/null +++ b/PREUPLOAD.cfg @@ -0,0 +1,6 @@ +[Builtin Hooks] +pylint = true + +[Builtin Hooks Options] +pylint = --init-hook="import sys; sys.path.insert(0, 'cli/lib/')" ${PREUPLOAD_FILES} + |