~hjd/ubuntu/wily/gyp/debian-merged

« back to all changes in this revision

Viewing changes to PRESUBMIT.py

  • Committer: Hans Joachim Desserud
  • Date: 2015-10-31 12:46:59 UTC
  • mfrom: (6.2.6 sid)
  • Revision ID: hans_joachim_desserud-20151031124659-lzxekr6woskh4k0b
Merge latest Debian version

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
    'test/lib/TestCmd.py',
17
17
    'test/lib/TestCommon.py',
18
18
    'test/lib/TestGyp.py',
19
 
    # Needs style fix.
20
 
    'pylib/gyp/generator/xcode.py',
21
19
]
22
20
 
23
21
 
25
23
    # TODO: fix me.
26
24
    # Many tests include modules they don't use.
27
25
    'W0611',
 
26
    # Possible unbalanced tuple unpacking with sequence.
 
27
    'W0632',
 
28
    # Attempting to unpack a non-sequence.
 
29
    'W0633',
28
30
    # Include order doesn't properly include local files?
29
31
    'F0401',
30
32
    # Some use of built-in names.
40
42
    'W0613',
41
43
    # String has no effect (docstring in wrong place).
42
44
    'W0105',
 
45
    # map/filter on lambda could be replaced by comprehension.
 
46
    'W0110',
 
47
    # Use of eval.
 
48
    'W0123',
43
49
    # Comma not followed by space.
44
50
    'C0324',
45
51
    # Access to a protected member.
56
62
    'E1101',
57
63
    # Dangerous default {}.
58
64
    'W0102',
 
65
    # Cyclic import.
 
66
    'R0401',
59
67
    # Others, too many to sort.
60
68
    'W0201', 'W0232', 'E1103', 'W0621', 'W0108', 'W0223', 'W0231',
61
69
    'R0201', 'E0101', 'C0321',
97
105
      'http://gyp-status.appspot.com/status',
98
106
      'http://gyp-status.appspot.com/current'))
99
107
 
 
108
  import os
100
109
  import sys
101
110
  old_sys_path = sys.path
102
111
  try:
103
112
    sys.path = ['pylib', 'test/lib'] + sys.path
 
113
    blacklist = PYLINT_BLACKLIST
 
114
    if sys.platform == 'win32':
 
115
      blacklist = [os.path.normpath(x).replace('\\', '\\\\')
 
116
                   for x in PYLINT_BLACKLIST]
104
117
    report.extend(input_api.canned_checks.RunPylint(
105
118
        input_api,
106
119
        output_api,
107
 
        black_list=PYLINT_BLACKLIST,
 
120
        black_list=blacklist,
108
121
        disabled_warnings=PYLINT_DISABLED_WARNINGS))
109
122
  finally:
110
123
    sys.path = old_sys_path
111
124
  return report
112
125
 
113
126
 
114
 
def GetPreferredTrySlaves():
115
 
  return ['gyp-win32', 'gyp-win64', 'gyp-linux', 'gyp-mac', 'gyp-android']
 
127
TRYBOTS = [
 
128
    'linux_try',
 
129
    'mac_try',
 
130
    'win_try',
 
131
]
 
132
 
 
133
 
 
134
def GetPreferredTryMasters(_, change):
 
135
  return {
 
136
      'client.gyp': { t: set(['defaulttests']) for t in TRYBOTS },
 
137
  }