| 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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 r".+\.inl$", r".+\.asm$", r".+\.hxx$", r".+\.hpp$", r".+\.s$", r".+\.S$", | 188 r".+\.inl$", r".+\.asm$", r".+\.hxx$", r".+\.hpp$", r".+\.s$", r".+\.S$", |
| 189 # Scripts | 189 # Scripts |
| 190 r".+\.js$", r".+\.py$", r".+\.sh$", r".+\.rb$", r".+\.pl$", r".+\.pm$", | 190 r".+\.js$", r".+\.py$", r".+\.sh$", r".+\.rb$", r".+\.pl$", r".+\.pm$", |
| 191 # Other | 191 # Other |
| 192 r".+\.java$", r".+\.mk$", r".+\.am$", r".+\.css$" | 192 r".+\.java$", r".+\.mk$", r".+\.am$", r".+\.css$" |
| 193 ) | 193 ) |
| 194 | 194 |
| 195 # Path regexp that should be excluded from being considered containing source | 195 # Path regexp that should be excluded from being considered containing source |
| 196 # files. Don't modify this list from a presubmit script! | 196 # files. Don't modify this list from a presubmit script! |
| 197 DEFAULT_BLACK_LIST = ( | 197 DEFAULT_BLACK_LIST = ( |
| 198 r"testing_support[\\\/]google_appengine[\\\/].*", |
| 198 r".*\bexperimental[\\\/].*", | 199 r".*\bexperimental[\\\/].*", |
| 199 r".*\bthird_party[\\\/].*", | 200 r".*\bthird_party[\\\/].*", |
| 200 # Output directories (just in case) | 201 # Output directories (just in case) |
| 201 r".*\bDebug[\\\/].*", | 202 r".*\bDebug[\\\/].*", |
| 202 r".*\bRelease[\\\/].*", | 203 r".*\bRelease[\\\/].*", |
| 203 r".*\bxcodebuild[\\\/].*", | 204 r".*\bxcodebuild[\\\/].*", |
| 204 r".*\bsconsbuild[\\\/].*", | 205 r".*\bsconsbuild[\\\/].*", |
| 205 # All caps files like README and LICENCE. | 206 # All caps files like README and LICENCE. |
| 206 r".*\b[A-Z0-9_]{2,}$", | 207 r".*\b[A-Z0-9_]{2,}$", |
| 207 # SCM (can happen in dual SCM configuration). (Slightly over aggressive) | 208 # SCM (can happen in dual SCM configuration). (Slightly over aggressive) |
| (...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1259 except PresubmitFailure, e: | 1260 except PresubmitFailure, e: |
| 1260 print >> sys.stderr, e | 1261 print >> sys.stderr, e |
| 1261 print >> sys.stderr, 'Maybe your depot_tools is out of date?' | 1262 print >> sys.stderr, 'Maybe your depot_tools is out of date?' |
| 1262 print >> sys.stderr, 'If all fails, contact maruel@' | 1263 print >> sys.stderr, 'If all fails, contact maruel@' |
| 1263 return 2 | 1264 return 2 |
| 1264 | 1265 |
| 1265 | 1266 |
| 1266 if __name__ == '__main__': | 1267 if __name__ == '__main__': |
| 1267 fix_encoding.fix_encoding() | 1268 fix_encoding.fix_encoding() |
| 1268 sys.exit(Main(None)) | 1269 sys.exit(Main(None)) |
| OLD | NEW |