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

[Merged by Bors] - lint(scripts/lint-style): Add linting for lower-case clashes #6825

Closed
wants to merge 2 commits into from

Conversation

adomani
Copy link
Collaborator

@adomani adomani commented Aug 28, 2023

Introduce a global check on git-managed filenames in the whole repository, making sure that the filenames are distinct also up to upper/lower casing.

Fixes an issue that came up when two file names that only differed by their casing were imported in a case-insensitive operating system.

As a check, I pushed branch#adomani/testUpperLowerLinter from this PR containing CODe_OF_CONDUCT.md alongside CODE_OF_CONDUCT.md. The linter failed on that branch.


Open in Gitpod

@alexjbest
Copy link
Member

The linter output looks a bit strange in the test branch on github actions, the input and output lines seem to get interspersed.
Personally I don't mind that so much I think the output is sufficient to get the point across.

Copy link
Member

@jcommelin jcommelin left a comment

Choose a reason for hiding this comment

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

Thanks 🎉

bors merge

@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added ready-to-merge This PR has been sent to bors. and removed awaiting-review labels Aug 28, 2023
@adomani
Copy link
Collaborator Author

adomani commented Aug 28, 2023

I noticed that and I wonder if it is due to the options set at the beginning of the file. On my computer, the output is what I expect it to be.

I can remove all printouts other that the clashing filenames, if it is preferable.

bors bot pushed a commit that referenced this pull request Aug 28, 2023
Introduce a global check on git-managed filenames in the whole repository, making sure that the filenames are distinct also up to upper/lower casing.

Fixes an issue that came up when two file names that only differed by their casing were imported in a case-insensitive operating system.

As a check, I pushed [branch#adomani/testUpperLowerLinter](https://github.com/leanprover-community/mathlib4/tree/adomani/testUpperLowerLinter) from this PR containing `CODe_OF_CONDUCT.md` alongside `CODE_OF_CONDUCT.md`.  The [linter failed](https://github.com/leanprover-community/mathlib4/actions/runs/5997399826/job/16263715177) on that branch.
@bors
Copy link

bors bot commented Aug 28, 2023

Pull request successfully merged into master.

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot changed the title lint(scripts/lint-style): Add linting for lower-case clashes [Merged by Bors] - lint(scripts/lint-style): Add linting for lower-case clashes Aug 28, 2023
@bors bors bot closed this Aug 28, 2023
@bors bors bot deleted the adomani/lintUpperLower branch August 28, 2023 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR has been sent to bors.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants