OLD | NEW |
1 # Copyright 2012 the V8 project authors. All rights reserved. | 1 # Copyright 2012 the V8 project authors. All rights reserved. |
2 # Redistribution and use in source and binary forms, with or without | 2 # Redistribution and use in source and binary forms, with or without |
3 # modification, are permitted provided that the following conditions are | 3 # modification, are permitted provided that the following conditions are |
4 # met: | 4 # met: |
5 # | 5 # |
6 # * Redistributions of source code must retain the above copyright | 6 # * Redistributions of source code must retain the above copyright |
7 # notice, this list of conditions and the following disclaimer. | 7 # notice, this list of conditions and the following disclaimer. |
8 # * Redistributions in binary form must reproduce the above | 8 # * Redistributions in binary form must reproduce the above |
9 # copyright notice, this list of conditions and the following | 9 # copyright notice, this list of conditions and the following |
10 # disclaimer in the documentation and/or other materials provided | 10 # disclaimer in the documentation and/or other materials provided |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 """Runs the V8 presubmit checks.""" | 64 """Runs the V8 presubmit checks.""" |
65 import sys | 65 import sys |
66 sys.path.append(input_api.os_path.join( | 66 sys.path.append(input_api.os_path.join( |
67 input_api.PresubmitLocalPath(), 'tools')) | 67 input_api.PresubmitLocalPath(), 'tools')) |
68 from presubmit import CppLintProcessor | 68 from presubmit import CppLintProcessor |
69 from presubmit import SourceProcessor | 69 from presubmit import SourceProcessor |
70 from presubmit import CheckAuthorizedAuthor | 70 from presubmit import CheckAuthorizedAuthor |
71 from presubmit import CheckStatusFiles | 71 from presubmit import CheckStatusFiles |
72 | 72 |
73 results = [] | 73 results = [] |
74 if not CppLintProcessor().Run(input_api.PresubmitLocalPath()): | 74 if not CppLintProcessor().RunOnFiles(input_api.AffectedFiles()): |
75 results.append(output_api.PresubmitError("C++ lint check failed")) | 75 results.append(output_api.PresubmitError("C++ lint check failed")) |
76 if not SourceProcessor().Run(input_api.PresubmitLocalPath()): | 76 if not SourceProcessor().RunOnFiles(input_api.AffectedFiles()): |
77 results.append(output_api.PresubmitError( | 77 results.append(output_api.PresubmitError( |
78 "Copyright header, trailing whitespaces and two empty lines " \ | 78 "Copyright header, trailing whitespaces and two empty lines " \ |
79 "between declarations check failed")) | 79 "between declarations check failed")) |
80 if not CheckStatusFiles(input_api.PresubmitLocalPath()): | 80 if not CheckStatusFiles(input_api.PresubmitLocalPath()): |
81 results.append(output_api.PresubmitError("Status file check failed")) | 81 results.append(output_api.PresubmitError("Status file check failed")) |
82 results.extend(CheckAuthorizedAuthor(input_api, output_api)) | 82 results.extend(CheckAuthorizedAuthor(input_api, output_api)) |
83 return results | 83 return results |
84 | 84 |
85 | 85 |
86 def _CheckUnwantedDependencies(input_api, output_api): | 86 def _CheckUnwantedDependencies(input_api, output_api): |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 def CheckChangeOnCommit(input_api, output_api): | 282 def CheckChangeOnCommit(input_api, output_api): |
283 results = [] | 283 results = [] |
284 results.extend(_CommonChecks(input_api, output_api)) | 284 results.extend(_CommonChecks(input_api, output_api)) |
285 results.extend(input_api.canned_checks.CheckChangeHasDescription( | 285 results.extend(input_api.canned_checks.CheckChangeHasDescription( |
286 input_api, output_api)) | 286 input_api, output_api)) |
287 if not _SkipTreeCheck(input_api, output_api): | 287 if not _SkipTreeCheck(input_api, output_api): |
288 results.extend(input_api.canned_checks.CheckTreeIsOpen( | 288 results.extend(input_api.canned_checks.CheckTreeIsOpen( |
289 input_api, output_api, | 289 input_api, output_api, |
290 json_url='http://v8-status.appspot.com/current?format=json')) | 290 json_url='http://v8-status.appspot.com/current?format=json')) |
291 return results | 291 return results |
OLD | NEW |