Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(719)

Side by Side Diff: presubmit_support.py

Issue 9109001: Add CSS as a source file type. (Closed) Base URL: http://src.chromium.org/svn/trunk/tools/depot_tools/
Patch Set: '' Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « presubmit_canned_checks.py ('k') | tests/presubmit_unittest.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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))
OLDNEW
« no previous file with comments | « presubmit_canned_checks.py ('k') | tests/presubmit_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698