have tidy always check Cargo.lock

This commit is contained in:
Siddhartha Mishra 2019-09-21 13:05:05 +05:30
parent 4fe8238b14
commit 3ced8d4ddc

View file

@ -65,7 +65,7 @@ COMMENTS = ["// ", "# ", " *", "/* "]
# File patterns to include in the non-WPT tidy check.
FILE_PATTERNS_TO_CHECK = ["*.rs", "*.rc", "*.cpp", "*.c",
"*.h", "Cargo.lock", "*.py", "*.sh",
"*.h", "*.py", "*.sh",
"*.toml", "*.webidl", "*.json", "*.html",
"*.yml"]
@ -193,6 +193,9 @@ def filter_file(file_name):
def filter_files(start_dir, only_changed_files, progress):
file_iter = FileList(start_dir, only_changed_files=only_changed_files,
exclude_dirs=config["ignore"]["directories"], progress=progress)
# always yield Cargo.lock so that the correctness of transitive dependacies is checked
yield "./Cargo.lock"
for file_name in file_iter:
base_name = os.path.basename(file_name)
if not any(fnmatch.fnmatch(base_name, pattern) for pattern in FILE_PATTERNS_TO_CHECK):