mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 02:31:29 +00:00
Add .rs to list of presubmit source file patterns
.rs files were not part of DEFAULT_FILES_TO_CHECK which means that they
were not being checked for proper licenses, among other things.
Testing with this command reveals that six missing or bad licenses have
crept in:
git cl presubmit --force --files "*.rs"
Output was:
Found a bad license header in these files:
build\rust\tests\test_aliased_deps\main.rs
build\rust\tests\test_aliased_deps\real_name.rs
mojo\public\rust\tests\util\mojom_validation.rs
testing\rust_gtest_interop\gtest_attribute.rs
tools\crates\gnrt\sample_package\foo\src\lib.rs
tools\crates\gnrt\sample_package\src\main.rs
Change-Id: Ia7788d92d428a4060f4a0b854fdcee0450b0a3f6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4128762
Commit-Queue: Gavin Mak <gavinmak@google.com>
Auto-Submit: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Collin Baker <collinbaker@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
This commit is contained in:
@@ -573,7 +573,7 @@ class InputApi(object):
|
||||
r'.+\.pm$',
|
||||
# Other
|
||||
r'.+\.java$', r'.+\.mk$', r'.+\.am$', r'.+\.css$', r'.+\.mojom$',
|
||||
r'.+\.fidl$'
|
||||
r'.+\.fidl$', r'.+\.rs$',
|
||||
)
|
||||
|
||||
# Path regexp that should be excluded from being considered containing source
|
||||
|
||||
@@ -1399,7 +1399,7 @@ class InputApiUnittest(PresubmitTestsBase):
|
||||
def testDefaultOverrides(self):
|
||||
input_api = presubmit.InputApi(
|
||||
self.fake_change, './PRESUBMIT.py', False, None, False)
|
||||
self.assertEqual(len(input_api.DEFAULT_FILES_TO_CHECK), 25)
|
||||
self.assertEqual(len(input_api.DEFAULT_FILES_TO_CHECK), 26)
|
||||
self.assertEqual(len(input_api.DEFAULT_FILES_TO_SKIP), 12)
|
||||
|
||||
input_api.DEFAULT_FILES_TO_CHECK = (r'.+\.c$',)
|
||||
|
||||
Reference in New Issue
Block a user