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

Side by Side Diff: PRESUBMIT.py

Issue 2577553004: Remove presubmit exception for //content/shell/tools/plugin. (Closed)
Patch Set: Created 4 years 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 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 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 """Top-level presubmit script for Chromium. 5 """Top-level presubmit script for Chromium.
6 6
7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts 7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
8 for more details about the presubmit API built into depot_tools. 8 for more details about the presubmit API built into depot_tools.
9 """ 9 """
10 10
(...skipping 10 matching lines...) Expand all
21 r".*MakeFile$", 21 r".*MakeFile$",
22 r".+_autogen\.h$", 22 r".+_autogen\.h$",
23 r".+[\\\/]pnacl_shim\.c$", 23 r".+[\\\/]pnacl_shim\.c$",
24 r"^gpu[\\\/]config[\\\/].*_list_json\.cc$", 24 r"^gpu[\\\/]config[\\\/].*_list_json\.cc$",
25 r"^chrome[\\\/]browser[\\\/]resources[\\\/]pdf[\\\/]index.js", 25 r"^chrome[\\\/]browser[\\\/]resources[\\\/]pdf[\\\/]index.js",
26 r".*vulcanized.html$", 26 r".*vulcanized.html$",
27 r".*crisper.js$", 27 r".*crisper.js$",
28 ) 28 )
29 29
30 30
31 # The NetscapePlugIn library is excluded from pan-project as it will soon
32 # be deleted together with the rest of the NPAPI and it's not worthwhile to
33 # update the coding style until then.
34 _TESTRUNNER_PATHS = (
35 r"^content[\\\/]shell[\\\/]tools[\\\/]plugin[\\\/].*",
36 )
37
38
39 # Fragment of a regular expression that matches C++ and Objective-C++ 31 # Fragment of a regular expression that matches C++ and Objective-C++
40 # implementation files. 32 # implementation files.
41 _IMPLEMENTATION_EXTENSIONS = r'\.(cc|cpp|cxx|mm)$' 33 _IMPLEMENTATION_EXTENSIONS = r'\.(cc|cpp|cxx|mm)$'
42 34
43 35
44 # Regular expression that matches code only used for test binaries 36 # Regular expression that matches code only used for test binaries
45 # (best effort). 37 # (best effort).
46 _TEST_CODE_EXCLUDED_PATHS = ( 38 _TEST_CODE_EXCLUDED_PATHS = (
47 r'.*[\\\/](fake_|test_|mock_).+%s' % _IMPLEMENTATION_EXTENSIONS, 39 r'.*[\\\/](fake_|test_|mock_).+%s' % _IMPLEMENTATION_EXTENSIONS,
48 r'.+_test_(base|support|util)%s' % _IMPLEMENTATION_EXTENSIONS, 40 r'.+_test_(base|support|util)%s' % _IMPLEMENTATION_EXTENSIONS,
(...skipping 1980 matching lines...) Expand 10 before | Expand all | Expand 10 after
2029 results.extend(_CheckAndroidNewMdpiAssetLocation(input_api, output_api)) 2021 results.extend(_CheckAndroidNewMdpiAssetLocation(input_api, output_api))
2030 results.extend(_CheckAndroidToastUsage(input_api, output_api)) 2022 results.extend(_CheckAndroidToastUsage(input_api, output_api))
2031 return results 2023 return results
2032 2024
2033 2025
2034 def _CommonChecks(input_api, output_api): 2026 def _CommonChecks(input_api, output_api):
2035 """Checks common to both upload and commit.""" 2027 """Checks common to both upload and commit."""
2036 results = [] 2028 results = []
2037 results.extend(input_api.canned_checks.PanProjectChecks( 2029 results.extend(input_api.canned_checks.PanProjectChecks(
2038 input_api, output_api, 2030 input_api, output_api,
2039 excluded_paths=_EXCLUDED_PATHS + _TESTRUNNER_PATHS)) 2031 excluded_paths=_EXCLUDED_PATHS))
2040 results.extend( 2032 results.extend(
2041 input_api.canned_checks.CheckAuthorizedAuthor(input_api, output_api)) 2033 input_api.canned_checks.CheckAuthorizedAuthor(input_api, output_api))
2042 results.extend( 2034 results.extend(
2043 _CheckNoProductionCodeUsingTestOnlyFunctions(input_api, output_api)) 2035 _CheckNoProductionCodeUsingTestOnlyFunctions(input_api, output_api))
2044 results.extend(_CheckNoIOStreamInHeaders(input_api, output_api)) 2036 results.extend(_CheckNoIOStreamInHeaders(input_api, output_api))
2045 results.extend(_CheckNoUNIT_TESTInSourceFiles(input_api, output_api)) 2037 results.extend(_CheckNoUNIT_TESTInSourceFiles(input_api, output_api))
2046 results.extend(_CheckDCHECK_IS_ONHasBraces(input_api, output_api)) 2038 results.extend(_CheckDCHECK_IS_ONHasBraces(input_api, output_api))
2047 results.extend(_CheckNoNewWStrings(input_api, output_api)) 2039 results.extend(_CheckNoNewWStrings(input_api, output_api))
2048 results.extend(_CheckNoDEPSGIT(input_api, output_api)) 2040 results.extend(_CheckNoDEPSGIT(input_api, output_api))
2049 results.extend(_CheckNoBannedFunctions(input_api, output_api)) 2041 results.extend(_CheckNoBannedFunctions(input_api, output_api))
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
2328 results.extend(input_api.canned_checks.CheckTreeIsOpen( 2320 results.extend(input_api.canned_checks.CheckTreeIsOpen(
2329 input_api, 2321 input_api,
2330 output_api, 2322 output_api,
2331 json_url='http://chromium-status.appspot.com/current?format=json')) 2323 json_url='http://chromium-status.appspot.com/current?format=json'))
2332 2324
2333 results.extend(input_api.canned_checks.CheckChangeHasBugField( 2325 results.extend(input_api.canned_checks.CheckChangeHasBugField(
2334 input_api, output_api)) 2326 input_api, output_api))
2335 results.extend(input_api.canned_checks.CheckChangeHasDescription( 2327 results.extend(input_api.canned_checks.CheckChangeHasDescription(
2336 input_api, output_api)) 2328 input_api, output_api))
2337 return results 2329 return results
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