summaryrefslogtreecommitdiff
path: root/tools/gyp/PRESUBMIT.py
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2012-07-03 20:56:06 +0200
committerBen Noordhuis <info@bnoordhuis.nl>2012-07-03 20:56:35 +0200
commitfc4e12b8f1d6e3ea010d575504011deee2a97b16 (patch)
treeb7ef6352a6c36c26c5446c1a803d9d1bf462d163 /tools/gyp/PRESUBMIT.py
parent5da78905a6c82aa40f79ae8ff1a74a53bc89a588 (diff)
downloadandroid-node-v8-fc4e12b8f1d6e3ea010d575504011deee2a97b16.tar.gz
android-node-v8-fc4e12b8f1d6e3ea010d575504011deee2a97b16.tar.bz2
android-node-v8-fc4e12b8f1d6e3ea010d575504011deee2a97b16.zip
tools: update gyp to r1426
Diffstat (limited to 'tools/gyp/PRESUBMIT.py')
-rw-r--r--tools/gyp/PRESUBMIT.py62
1 files changed, 60 insertions, 2 deletions
diff --git a/tools/gyp/PRESUBMIT.py b/tools/gyp/PRESUBMIT.py
index 146327d784..0338fb4a96 100644
--- a/tools/gyp/PRESUBMIT.py
+++ b/tools/gyp/PRESUBMIT.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2011 Google Inc. All rights reserved.
+# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -10,6 +10,62 @@ for more details about the presubmit API built into gcl.
"""
+PYLINT_BLACKLIST = [
+ # TODO: fix me.
+ # From SCons, not done in google style.
+ 'test/lib/TestCmd.py',
+ 'test/lib/TestCommon.py',
+ 'test/lib/TestGyp.py',
+ # Needs style fix.
+ 'pylib/gyp/generator/scons.py',
+ 'pylib/gyp/generator/xcode.py',
+]
+
+
+PYLINT_DISABLED_WARNINGS = [
+ # TODO: fix me.
+ # Many tests include modules they don't use.
+ 'W0611',
+ # Include order doesn't properly include local files?
+ 'F0401',
+ # Some use of built-in names.
+ 'W0622',
+ # Some unused variables.
+ 'W0612',
+ # Operator not preceded/followed by space.
+ 'C0323',
+ 'C0322',
+ # Unnecessary semicolon.
+ 'W0301',
+ # Unused argument.
+ 'W0613',
+ # String has no effect (docstring in wrong place).
+ 'W0105',
+ # Comma not followed by space.
+ 'C0324',
+ # Access to a protected member.
+ 'W0212',
+ # Bad indent.
+ 'W0311',
+ # Line too long.
+ 'C0301',
+ # Undefined variable.
+ 'E0602',
+ # Not exception type specified.
+ 'W0702',
+ # No member of that name.
+ 'E1101',
+ # Dangerous default {}.
+ 'W0102',
+ # Others, too many to sort.
+ 'W0201', 'W0232', 'E1103', 'W0621', 'W0108', 'W0223', 'W0231',
+ 'R0201', 'E0101', 'C0321',
+ # ************* Module copy
+ # W0104:427,12:_test.odict.__setitem__: Statement seems to have no effect
+ 'W0104',
+]
+
+
def CheckChangeOnUpload(input_api, output_api):
report = []
report.extend(input_api.canned_checks.PanProjectChecks(
@@ -41,7 +97,9 @@ def CheckChangeOnCommit(input_api, output_api):
sys.path = ['pylib', 'test/lib'] + sys.path
report.extend(input_api.canned_checks.RunPylint(
input_api,
- output_api))
+ output_api,
+ black_list=PYLINT_BLACKLIST,
+ disabled_warnings=PYLINT_DISABLED_WARNINGS))
finally:
sys.path = old_sys_path
return report