Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a lint that checks paths are unique irrespective of case #28396

Merged
merged 1 commit into from Apr 22, 2021

Conversation

jgraham
Copy link
Contributor

@jgraham jgraham commented Apr 7, 2021

Paths that are the same excluding case don't work reliably across
operating systems and can be forbidden by vendor CI. So we should
error on these paths in the lint.

Copy link
Contributor

@Ms2ger Ms2ger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine, once CI passes.

@@ -396,6 +396,20 @@ def check_unique_testharness_basenames(repo_root, paths):
return errors


def check_unique_case_insensitive_paths(repo_root, paths):
# type: (Text, List[Text]) -> List[rules.Error]
seen = {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tools/lint/lint.py:401: error: Need type annotation for 'seen' (hint: "seen: Dict[<type>, <type>] = ...")

Paths that are the same excluding case don't work reliably across
operating systems and can be forbidden by vendor CI. So we should
error on these paths in the lint.
@jgraham jgraham force-pushed the duplicate_path_case_insensitive branch from 020e300 to d711d35 Compare April 22, 2021 12:11
@jgraham jgraham merged commit ff952d5 into master Apr 22, 2021
@jgraham jgraham deleted the duplicate_path_case_insensitive branch April 22, 2021 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants