| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 """Enables directory-specific presubmit checks to run at upload and/or commit. | 6 """Enables directory-specific presubmit checks to run at upload and/or commit. |
| 7 """ | 7 """ |
| 8 | 8 |
| 9 __version__ = '1.6.1' | 9 __version__ = '1.6.1' |
| 10 | 10 |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 # Files without an extension aren't included in the list. If you want to | 191 # Files without an extension aren't included in the list. If you want to |
| 192 # filter them as source files, add r"(^|.*?[\\\/])[^.]+$" to the white list. | 192 # filter them as source files, add r"(^|.*?[\\\/])[^.]+$" to the white list. |
| 193 # Note that ALL CAPS files are black listed in DEFAULT_BLACK_LIST below. | 193 # Note that ALL CAPS files are black listed in DEFAULT_BLACK_LIST below. |
| 194 DEFAULT_WHITE_LIST = ( | 194 DEFAULT_WHITE_LIST = ( |
| 195 # C++ and friends | 195 # C++ and friends |
| 196 r".+\.c$", r".+\.cc$", r".+\.cpp$", r".+\.h$", r".+\.m$", r".+\.mm$", | 196 r".+\.c$", r".+\.cc$", r".+\.cpp$", r".+\.h$", r".+\.m$", r".+\.mm$", |
| 197 r".+\.inl$", r".+\.asm$", r".+\.hxx$", r".+\.hpp$", r".+\.s$", r".+\.S$", | 197 r".+\.inl$", r".+\.asm$", r".+\.hxx$", r".+\.hpp$", r".+\.s$", r".+\.S$", |
| 198 # Scripts | 198 # Scripts |
| 199 r".+\.js$", r".+\.py$", r".+\.sh$", r".+\.rb$", r".+\.pl$", r".+\.pm$", | 199 r".+\.js$", r".+\.py$", r".+\.sh$", r".+\.rb$", r".+\.pl$", r".+\.pm$", |
| 200 # Other | 200 # Other |
| 201 r".+\.java$", r".+\.mk$", r".+\.am$", | 201 r".+\.java$", r".+\.mk$", r".+\.am$", r".+\.css$" |
| 202 ) | 202 ) |
| 203 | 203 |
| 204 # Path regexp that should be excluded from being considered containing source | 204 # Path regexp that should be excluded from being considered containing source |
| 205 # files. Don't modify this list from a presubmit script! | 205 # files. Don't modify this list from a presubmit script! |
| 206 DEFAULT_BLACK_LIST = ( | 206 DEFAULT_BLACK_LIST = ( |
| 207 r".*\bexperimental[\\\/].*", | 207 r".*\bexperimental[\\\/].*", |
| 208 r".*\bthird_party[\\\/].*", | 208 r".*\bthird_party[\\\/].*", |
| 209 # Output directories (just in case) | 209 # Output directories (just in case) |
| 210 r".*\bDebug[\\\/].*", | 210 r".*\bDebug[\\\/].*", |
| 211 r".*\bRelease[\\\/].*", | 211 r".*\bRelease[\\\/].*", |
| (...skipping 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1265 except PresubmitFailure, e: | 1265 except PresubmitFailure, e: |
| 1266 print >> sys.stderr, e | 1266 print >> sys.stderr, e |
| 1267 print >> sys.stderr, 'Maybe your depot_tools is out of date?' | 1267 print >> sys.stderr, 'Maybe your depot_tools is out of date?' |
| 1268 print >> sys.stderr, 'If all fails, contact maruel@' | 1268 print >> sys.stderr, 'If all fails, contact maruel@' |
| 1269 return 2 | 1269 return 2 |
| 1270 | 1270 |
| 1271 | 1271 |
| 1272 if __name__ == '__main__': | 1272 if __name__ == '__main__': |
| 1273 fix_encoding.fix_encoding() | 1273 fix_encoding.fix_encoding() |
| 1274 sys.exit(Main(None)) | 1274 sys.exit(Main(None)) |
| OLD | NEW |