Commit f6789988 authored by Michael Achenbach's avatar Michael Achenbach Committed by Commit Bot

[presubmit] Clean up insensitive terms

Updating was prepared on depot_tools side by https://crbug.com/1098560.

No-Try: true
Bug: v8:10619
Change-Id: If24aec3344e83857c09ce165be4203846b3a91b4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2316302Reviewed-by: 's avatarLiviu Rau <liviurau@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69083}
parent ce249dbb
...@@ -85,13 +85,13 @@ def _V8PresubmitChecks(input_api, output_api): ...@@ -85,13 +85,13 @@ def _V8PresubmitChecks(input_api, output_api):
def FilterFile(affected_file): def FilterFile(affected_file):
return input_api.FilterSourceFile( return input_api.FilterSourceFile(
affected_file, affected_file,
white_list=None, files_to_check=None,
black_list=_NO_LINT_PATHS) files_to_skip=_NO_LINT_PATHS)
def FilterTorqueFile(affected_file): def FilterTorqueFile(affected_file):
return input_api.FilterSourceFile( return input_api.FilterSourceFile(
affected_file, affected_file,
white_list=(r'.+\.tq')) files_to_check=(r'.+\.tq'))
results = [] results = []
if not CppLintProcessor().RunOnFiles( if not CppLintProcessor().RunOnFiles(
...@@ -110,7 +110,7 @@ def _V8PresubmitChecks(input_api, output_api): ...@@ -110,7 +110,7 @@ def _V8PresubmitChecks(input_api, output_api):
input_api.AffectedFiles(include_deletes=True)): input_api.AffectedFiles(include_deletes=True)):
results.append(output_api.PresubmitError("Status file check failed")) results.append(output_api.PresubmitError("Status file check failed"))
results.extend(input_api.canned_checks.CheckAuthorizedAuthor( results.extend(input_api.canned_checks.CheckAuthorizedAuthor(
input_api, output_api, bot_whitelist=[ input_api, output_api, bot_allowlist=[
'v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com' 'v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com'
])) ]))
return results return results
...@@ -234,12 +234,11 @@ def _CheckHeadersHaveIncludeGuards(input_api, output_api): ...@@ -234,12 +234,11 @@ def _CheckHeadersHaveIncludeGuards(input_api, output_api):
file_inclusion_pattern = r'src/.+\.h' file_inclusion_pattern = r'src/.+\.h'
def FilterFile(affected_file): def FilterFile(affected_file):
black_list = (_EXCLUDED_PATHS + files_to_skip = _EXCLUDED_PATHS + input_api.DEFAULT_FILES_TO_SKIP
input_api.DEFAULT_BLACK_LIST)
return input_api.FilterSourceFile( return input_api.FilterSourceFile(
affected_file, affected_file,
white_list=(file_inclusion_pattern, ), files_to_check=(file_inclusion_pattern, ),
black_list=black_list) files_to_skip=files_to_skip)
leading_src_pattern = input_api.re.compile(r'^src/') leading_src_pattern = input_api.re.compile(r'^src/')
dash_dot_slash_pattern = input_api.re.compile(r'[-./]') dash_dot_slash_pattern = input_api.re.compile(r'[-./]')
...@@ -296,12 +295,11 @@ def _CheckNoInlineHeaderIncludesInNormalHeaders(input_api, output_api): ...@@ -296,12 +295,11 @@ def _CheckNoInlineHeaderIncludesInNormalHeaders(input_api, output_api):
'header (e.g. bar.h) file. This violates layering of dependencies.') 'header (e.g. bar.h) file. This violates layering of dependencies.')
def FilterFile(affected_file): def FilterFile(affected_file):
black_list = (_EXCLUDED_PATHS + files_to_skip = _EXCLUDED_PATHS + input_api.DEFAULT_FILES_TO_SKIP
input_api.DEFAULT_BLACK_LIST)
return input_api.FilterSourceFile( return input_api.FilterSourceFile(
affected_file, affected_file,
white_list=(file_inclusion_pattern, ), files_to_check=(file_inclusion_pattern, ),
black_list=black_list) files_to_skip=files_to_skip)
problems = [] problems = []
for f in input_api.AffectedSourceFiles(FilterFile): for f in input_api.AffectedSourceFiles(FilterFile):
...@@ -336,13 +334,13 @@ def _CheckNoProductionCodeUsingTestOnlyFunctions(input_api, output_api): ...@@ -336,13 +334,13 @@ def _CheckNoProductionCodeUsingTestOnlyFunctions(input_api, output_api):
base_function_pattern, base_function_pattern)) base_function_pattern, base_function_pattern))
def FilterFile(affected_file): def FilterFile(affected_file):
black_list = (_EXCLUDED_PATHS + files_to_skip = (_EXCLUDED_PATHS +
_TEST_CODE_EXCLUDED_PATHS + _TEST_CODE_EXCLUDED_PATHS +
input_api.DEFAULT_BLACK_LIST) input_api.DEFAULT_FILES_TO_SKIP)
return input_api.FilterSourceFile( return input_api.FilterSourceFile(
affected_file, affected_file,
white_list=(file_inclusion_pattern, ), files_to_check=(file_inclusion_pattern, ),
black_list=black_list) files_to_skip=files_to_skip)
problems = [] problems = []
for f in input_api.AffectedSourceFiles(FilterFile): for f in input_api.AffectedSourceFiles(FilterFile):
...@@ -363,7 +361,7 @@ def _CheckNoProductionCodeUsingTestOnlyFunctions(input_api, output_api): ...@@ -363,7 +361,7 @@ def _CheckNoProductionCodeUsingTestOnlyFunctions(input_api, output_api):
def _CheckGenderNeutralInLicenses(input_api, output_api): def _CheckGenderNeutralInLicenses(input_api, output_api):
# License files are taken as is, even if they include gendered pronouns. # License files are taken as is, even if they include gendered pronouns.
def LicenseFilter(path): def LicenseFilter(path):
input_api.FilterSourceFile(path, black_list=_LICENSE_FILE) input_api.FilterSourceFile(path, files_to_skip=_LICENSE_FILE)
return input_api.canned_checks.CheckGenderNeutral( return input_api.canned_checks.CheckGenderNeutral(
input_api, output_api, source_file_filter=LicenseFilter) input_api, output_api, source_file_filter=LicenseFilter)
...@@ -438,7 +436,7 @@ def _CheckJSONFiles(input_api, output_api): ...@@ -438,7 +436,7 @@ def _CheckJSONFiles(input_api, output_api):
def FilterFile(affected_file): def FilterFile(affected_file):
return input_api.FilterSourceFile( return input_api.FilterSourceFile(
affected_file, affected_file,
white_list=(r'.+\.json',)) files_to_check=(r'.+\.json',))
results = [] results = []
for f in input_api.AffectedFiles( for f in input_api.AffectedFiles(
...@@ -470,7 +468,7 @@ def _CheckNoexceptAnnotations(input_api, output_api): ...@@ -470,7 +468,7 @@ def _CheckNoexceptAnnotations(input_api, output_api):
def FilterFile(affected_file): def FilterFile(affected_file):
return input_api.FilterSourceFile( return input_api.FilterSourceFile(
affected_file, affected_file,
white_list=(r'src/.*', r'test/.*')) files_to_check=(r'src/.*', r'test/.*'))
# matches any class name. # matches any class name.
......
...@@ -169,7 +169,7 @@ def _check_test_spec(file_path, raw_pyl): ...@@ -169,7 +169,7 @@ def _check_test_spec(file_path, raw_pyl):
def CheckChangeOnCommit(input_api, output_api): def CheckChangeOnCommit(input_api, output_api):
def file_filter(regexp): def file_filter(regexp):
return lambda f: input_api.FilterSourceFile(f, white_list=(regexp,)) return lambda f: input_api.FilterSourceFile(f, files_to_check=(regexp,))
# Calculate which files are affected. # Calculate which files are affected.
if input_api.AffectedFiles(False, file_filter(r'.*PRESUBMIT\.py')): if input_api.AffectedFiles(False, file_filter(r'.*PRESUBMIT\.py')):
......
...@@ -4,5 +4,5 @@ ...@@ -4,5 +4,5 @@
def CheckChangeOnCommit(input_api, output_api): def CheckChangeOnCommit(input_api, output_api):
tests = input_api.canned_checks.GetUnitTestsInDirectory( tests = input_api.canned_checks.GetUnitTestsInDirectory(
input_api, output_api, 'unittests', whitelist=[r'.+_test\.py$']) input_api, output_api, 'unittests', files_to_check=[r'.+_test\.py$'])
return input_api.RunTests(tests) return input_api.RunTests(tests)
...@@ -4,5 +4,5 @@ ...@@ -4,5 +4,5 @@
def CheckChangeOnCommit(input_api, output_api): def CheckChangeOnCommit(input_api, output_api):
tests = input_api.canned_checks.GetUnitTestsInDirectory( tests = input_api.canned_checks.GetUnitTestsInDirectory(
input_api, output_api, '.', whitelist=['v8_foozzie_test.py$']) input_api, output_api, '.', files_to_check=['v8_foozzie_test.py$'])
return input_api.RunTests(tests) return input_api.RunTests(tests)
...@@ -4,5 +4,5 @@ ...@@ -4,5 +4,5 @@
def CheckChangeOnCommit(input_api, output_api): def CheckChangeOnCommit(input_api, output_api):
tests = input_api.canned_checks.GetUnitTestsInDirectory( tests = input_api.canned_checks.GetUnitTestsInDirectory(
input_api, output_api, '.', whitelist=['test_scripts.py$']) input_api, output_api, '.', files_to_check=['test_scripts.py$'])
return input_api.RunTests(tests) return input_api.RunTests(tests)
...@@ -7,8 +7,8 @@ def _CommonChecks(input_api, output_api): ...@@ -7,8 +7,8 @@ def _CommonChecks(input_api, output_api):
input_api, input_api,
output_api, output_api,
input_api.os_path.join(input_api.PresubmitLocalPath()), input_api.os_path.join(input_api.PresubmitLocalPath()),
whitelist=[r'.+_unittest\.py$'], files_to_check=[r'.+_unittest\.py$'],
blacklist=[], files_to_skip=[],
)) ))
def CheckChangeOnUpload(input_api, output_api): def CheckChangeOnUpload(input_api, output_api):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment