summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorscottmg@chromium.org <scottmg@chromium.org@78cadc50-ecff-11dd-a971-7dbc132099af>2013-12-04 17:25:10 +0000
committerscottmg@chromium.org <scottmg@chromium.org@78cadc50-ecff-11dd-a971-7dbc132099af>2013-12-04 17:25:10 +0000
commit27c626e0515f845338cb60b1d8405f40150a791d (patch)
treeb0907b47be77d6ad90a2aa690f870948980e26b8
parentce5fb1db59733782ce649f862c3f0d995dc9c69d (diff)
downloadgyp-27c626e0515f845338cb60b1d8405f40150a791d.tar.gz
Ignore pylint blacklist on Windows too
I'd been cursing pylint on every dcommit for the last year or so and then doing --bypass-hooks. This seems an improvement. R=thakis@chromium.org Review URL: https://codereview.chromium.org/104683005 git-svn-id: http://gyp.googlecode.com/svn/trunk@1806 78cadc50-ecff-11dd-a971-7dbc132099af
-rw-r--r--PRESUBMIT.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 5567b88b..9c474eb2 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -97,14 +97,19 @@ def CheckChangeOnCommit(input_api, output_api):
'http://gyp-status.appspot.com/status',
'http://gyp-status.appspot.com/current'))
+ import os
import sys
old_sys_path = sys.path
try:
sys.path = ['pylib', 'test/lib'] + sys.path
+ blacklist = PYLINT_BLACKLIST
+ if sys.platform == 'win32':
+ blacklist = [os.path.normpath(x).replace('\\', '\\\\')
+ for x in PYLINT_BLACKLIST]
report.extend(input_api.canned_checks.RunPylint(
input_api,
output_api,
- black_list=PYLINT_BLACKLIST,
+ black_list=blacklist,
disabled_warnings=PYLINT_DISABLED_WARNINGS))
finally:
sys.path = old_sys_path