OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright 2012 the V8 project authors. All rights reserved. | 3 # Copyright 2012 the V8 project authors. All rights reserved. |
4 # Redistribution and use in source and binary forms, with or without | 4 # Redistribution and use in source and binary forms, with or without |
5 # modification, are permitted provided that the following conditions are | 5 # modification, are permitted provided that the following conditions are |
6 # met: | 6 # met: |
7 # | 7 # |
8 # * Redistributions of source code must retain the above copyright | 8 # * Redistributions of source code must retain the above copyright |
9 # notice, this list of conditions and the following disclaimer. | 9 # notice, this list of conditions and the following disclaimer. |
10 # * Redistributions in binary form must reproduce the above | 10 # * Redistributions in binary form must reproduce the above |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 # build/include_what_you_use: Started giving false positives for variables | 50 # build/include_what_you_use: Started giving false positives for variables |
51 # named "string" and "map" assuming that you needed to include STL headers. | 51 # named "string" and "map" assuming that you needed to include STL headers. |
52 # TODO(bmeurer): Fix and re-enable readability/check | 52 # TODO(bmeurer): Fix and re-enable readability/check |
53 | 53 |
54 LINT_RULES = """ | 54 LINT_RULES = """ |
55 -build/header_guard | 55 -build/header_guard |
56 +build/include_alpha | 56 +build/include_alpha |
57 -build/include_what_you_use | 57 -build/include_what_you_use |
58 -build/namespaces | 58 -build/namespaces |
59 -readability/check | 59 -readability/check |
60 -readability/inheritance | |
61 -readability/nolint | 60 -readability/nolint |
62 +readability/streams | 61 +readability/streams |
63 -runtime/references | 62 -runtime/references |
64 """.split() | 63 """.split() |
65 | 64 |
66 LINT_OUTPUT_PATTERN = re.compile(r'^.+[:(]\d+[:)]|^Done processing') | 65 LINT_OUTPUT_PATTERN = re.compile(r'^.+[:(]\d+[:)]|^Done processing') |
67 FLAGS_LINE = re.compile("//\s*Flags:.*--([A-z0-9-])+_[A-z0-9].*\n") | 66 FLAGS_LINE = re.compile("//\s*Flags:.*--([A-z0-9-])+_[A-z0-9].*\n") |
68 | 67 |
69 def CppLintWorker(command): | 68 def CppLintWorker(command): |
70 try: | 69 try: |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 success = SourceProcessor().Run(workspace) and success | 451 success = SourceProcessor().Run(workspace) and success |
453 success = CheckExternalReferenceRegistration(workspace) and success | 452 success = CheckExternalReferenceRegistration(workspace) and success |
454 if success: | 453 if success: |
455 return 0 | 454 return 0 |
456 else: | 455 else: |
457 return 1 | 456 return 1 |
458 | 457 |
459 | 458 |
460 if __name__ == '__main__': | 459 if __name__ == '__main__': |
461 sys.exit(Main()) | 460 sys.exit(Main()) |
OLD | NEW |