Skip to content

Commit

Permalink
Exclude deleted file from wpt lint (#48178)
Browse files Browse the repository at this point in the history
The current linter incorrectly flags
capitalization changes in file names as
case-insensitive duplicates. This change fixes the
issue by filtering out deleted files from the git
diff.
  • Loading branch information
dev-ansung authored Sep 14, 2024
1 parent 6050460 commit 4c3d068
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/wpt/testfiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def repo_files_changed(revish: Text, include_uncommitted: bool = False, include_
# gives us that (via the merge-base)
revish = revish.replace("..", "...")

files_list = git("diff", "--no-renames", "--name-only", "-z", revish).split("\0")
files_list = git("diff", "--no-renames", "--name-only", "--diff-filter=d", "-z", revish).split("\0")
assert not files_list[-1], f"final item should be empty, got: {files_list[-1]!r}"
files = set(files_list[:-1])

Expand Down

0 comments on commit 4c3d068

Please sign in to comment.