| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # | 2 # |
| 3 # Copyright 2008 the V8 project authors. All rights reserved. | 3 # Copyright 2008 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 17 matching lines...) Expand all Loading... |
| 28 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 | 29 |
| 30 | 30 |
| 31 import optparse | 31 import optparse |
| 32 import os | 32 import os |
| 33 from os.path import abspath, join, dirname, basename | 33 from os.path import abspath, join, dirname, basename |
| 34 import re | 34 import re |
| 35 import sys | 35 import sys |
| 36 import subprocess | 36 import subprocess |
| 37 | 37 |
| 38 # Disabled LINT rules and reason. |
| 39 # build/include_what_you_use: Started giving false positives for variables |
| 40 # named "string" and "map" assuming that you needed to include STL headers. |
| 38 | 41 |
| 39 ENABLED_LINT_RULES = """ | 42 ENABLED_LINT_RULES = """ |
| 40 build/class | 43 build/class |
| 41 build/deprecated | 44 build/deprecated |
| 42 build/endif_comment | 45 build/endif_comment |
| 43 build/forward_decl | 46 build/forward_decl |
| 44 build/include_order | 47 build/include_order |
| 45 build/include_what_you_use | |
| 46 build/printf_format | 48 build/printf_format |
| 47 build/storage_class | 49 build/storage_class |
| 48 legal/copyright | 50 legal/copyright |
| 49 readability/boost | 51 readability/boost |
| 50 readability/braces | 52 readability/braces |
| 51 readability/casting | 53 readability/casting |
| 52 readability/check | 54 readability/check |
| 53 readability/constructors | 55 readability/constructors |
| 54 readability/fn_size | 56 readability/fn_size |
| 55 readability/function | 57 readability/function |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 success = CppLintProcessor().Run(workspace) and success | 222 success = CppLintProcessor().Run(workspace) and success |
| 221 success = SourceProcessor().Run(workspace) and success | 223 success = SourceProcessor().Run(workspace) and success |
| 222 if success: | 224 if success: |
| 223 return 0 | 225 return 0 |
| 224 else: | 226 else: |
| 225 return 1 | 227 return 1 |
| 226 | 228 |
| 227 | 229 |
| 228 if __name__ == '__main__': | 230 if __name__ == '__main__': |
| 229 sys.exit(Main()) | 231 sys.exit(Main()) |
| OLD | NEW |