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

Side by Side Diff: presubmit_canned_checks.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 | « no previous file | presubmit_support.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 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Generic presubmit checks that can be reused by other presubmit checks.""" 5 """Generic presubmit checks that can be reused by other presubmit checks."""
6 6
7 7
8 ### Description checks 8 ### Description checks
9 9
10 def CheckChangeHasTestField(input_api, output_api): 10 def CheckChangeHasTestField(input_api, output_api):
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 text_files = tuple(text_files or ( 848 text_files = tuple(text_files or (
849 r'.+\.txt$', 849 r'.+\.txt$',
850 r'.+\.json$', 850 r'.+\.json$',
851 )) 851 ))
852 project_name = project_name or 'Chromium' 852 project_name = project_name or 'Chromium'
853 license_header = license_header or ( 853 license_header = license_header or (
854 r'.*? Copyright \(c\) %(year)s The %(project)s Authors\. ' 854 r'.*? Copyright \(c\) %(year)s The %(project)s Authors\. '
855 r'All rights reserved\.\n' 855 r'All rights reserved\.\n'
856 r'.*? Use of this source code is governed by a BSD-style license that ' 856 r'.*? Use of this source code is governed by a BSD-style license that '
857 r'can be\n' 857 r'can be\n'
858 r'.*? found in the LICENSE file\.\n' 858 r'.*? found in the LICENSE file\.( \*/)?\n'
859 ) % { 859 ) % {
860 'year': input_api.time.strftime('%Y'), 860 'year': input_api.time.strftime('%Y'),
861 'project': project_name, 861 'project': project_name,
862 } 862 }
863 863
864 results = [] 864 results = []
865 # This code loads the default black list (e.g. third_party, experimental, etc) 865 # This code loads the default black list (e.g. third_party, experimental, etc)
866 # and add our black list (breakpad, skia and v8 are still not following 866 # and add our black list (breakpad, skia and v8 are still not following
867 # google style and are not really living this repository). 867 # google style and are not really living this repository).
868 # See presubmit_support.py InputApi.FilterSourceFile for the (simple) usage. 868 # See presubmit_support.py InputApi.FilterSourceFile for the (simple) usage.
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
913 results.extend(input_api.canned_checks.CheckSvnForCommonMimeTypes( 913 results.extend(input_api.canned_checks.CheckSvnForCommonMimeTypes(
914 input_api, output_api)) 914 input_api, output_api))
915 snapshot("checking license") 915 snapshot("checking license")
916 results.extend(input_api.canned_checks.CheckLicense( 916 results.extend(input_api.canned_checks.CheckLicense(
917 input_api, output_api, license_header, source_file_filter=sources)) 917 input_api, output_api, license_header, source_file_filter=sources))
918 snapshot("checking was uploaded") 918 snapshot("checking was uploaded")
919 results.extend(input_api.canned_checks.CheckChangeWasUploaded( 919 results.extend(input_api.canned_checks.CheckChangeWasUploaded(
920 input_api, output_api)) 920 input_api, output_api))
921 snapshot("done") 921 snapshot("done")
922 return results 922 return results
OLDNEW
« no previous file with comments | « no previous file | presubmit_support.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698