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

Side by Side Diff: presubmit_support.py

Issue 174210: Treat .txt files as 'source' files (to enforce LF and line length) (Closed)
Patch Set: Created 11 years, 4 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
« no previous file with comments | « no previous file | no next file » | 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/python 1 #!/usr/bin/python
2 # Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2006-2009 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.3.2' 9 __version__ = '1.3.2'
10 10
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 # perspective. Don't modify this list from a presubmit script! 147 # perspective. Don't modify this list from a presubmit script!
148 DEFAULT_WHITE_LIST = ( 148 DEFAULT_WHITE_LIST = (
149 # C++ and friends 149 # C++ and friends
150 r".*\.c", r".*\.cc", r".*\.cpp", r".*\.h", r".*\.m", r".*\.mm", 150 r".*\.c", r".*\.cc", r".*\.cpp", r".*\.h", r".*\.m", r".*\.mm",
151 r".*\.inl", r".*\.asm", r".*\.hxx", r".*\.hpp", 151 r".*\.inl", r".*\.asm", r".*\.hxx", r".*\.hpp",
152 # Scripts 152 # Scripts
153 r".*\.js", r".*\.py", r".*\.json", r".*\.sh", r".*\.rb", 153 r".*\.js", r".*\.py", r".*\.json", r".*\.sh", r".*\.rb",
154 # No extension at all 154 # No extension at all
155 r"(^|.*[\\\/])[^.]+$", 155 r"(^|.*[\\\/])[^.]+$",
156 # Other 156 # Other
157 r".*\.java", r".*\.mk", r".*\.am", 157 r".*\.java", r".*\.mk", r".*\.am", r".*\.txt",
158 ) 158 )
159 159
160 # Path regexp that should be excluded from being considered containing source 160 # Path regexp that should be excluded from being considered containing source
161 # files. Don't modify this list from a presubmit script! 161 # files. Don't modify this list from a presubmit script!
162 DEFAULT_BLACK_LIST = ( 162 DEFAULT_BLACK_LIST = (
163 r".*\bexperimental[\\\/].*", 163 r".*\bexperimental[\\\/].*",
164 r".*\bthird_party[\\\/].*", 164 r".*\bthird_party[\\\/].*",
165 # Output directories (just in case) 165 # Output directories (just in case)
166 r".*\bDebug[\\\/].*", 166 r".*\bDebug[\\\/].*",
167 r".*\bRelease[\\\/].*", 167 r".*\bRelease[\\\/].*",
(...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after
943 options.commit, 943 options.commit,
944 options.verbose, 944 options.verbose,
945 sys.stdout, 945 sys.stdout,
946 sys.stdin, 946 sys.stdin,
947 options.default_presubmit, 947 options.default_presubmit,
948 options.may_prompt) 948 options.may_prompt)
949 949
950 950
951 if __name__ == '__main__': 951 if __name__ == '__main__':
952 sys.exit(Main(sys.argv)) 952 sys.exit(Main(sys.argv))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698