Repository navigation
[Merged by Bors] - feat(Tactic/Linter/TextBased): lint against more characters in module names - #44803
[Merged by Bors] - feat(Tactic/Linter/TextBased): lint against more characters in module names#44803SnirBroshi wants to merge 6 commits into
Conversation
PR summary 9a53dff8b8Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
|
I think you need to fix the tests. |
joneugster
left a comment
There was a problem hiding this comment.
Looks good to me, thanks for the PR!
maintainer merge
|
🚀 Pull request has been placed on the maintainer queue by joneugster. |
Vierkantor
left a comment
There was a problem hiding this comment.
I would say this linter is not super likely to be tripped and users can have good reasons to violate the rules. So I'd like to encourage us to focus on more immediately useful linters. But given the PR already exists, and matches unofficial policy within Mathlib I'm okay with being strict here and then allowing exceptions later if the style linter runs in other projects.
bors d+
|
✌️ SnirBroshi can now approve this pull request until 2026-11-11 11:27 UTC (in 2 weeks). To approve and merge, reply with
|
…o feature/linter/module-names-allowlist
|
Usually I'd be more adamant about this. I think it's a shame that Mathlib embraces Unicode so openly, and yet we hesitate to use it outside of notation, even for the names of living people. But with file systems in particular... every OS stores them their own way, no one wants to deal with UTF-16, and lots of software (notably some LaTeX packages) will give obscure errors if you don't stick to pure ASCII. So I think being careful is warranted. |
The idea here is similar to the unicode linter: protect against unicode shenanigans. While I'm not sure if I (or Jon) will work on it soon, the plan is to extend both this and the unicode linter to all the files in Mathlib rather than just Lean modules imported by Thanks! |
… names (#44803) Instead of forbidding `<>"/\|?*` and whitespace, we forbid everything except for alphanumeric characters and `_`.
|
Pull request successfully merged into master. Build succeeded: |
Instead of forbidding
<>"/\|?*and whitespace, we forbid everything except for alphanumeric characters and_.I checked
downstream_repos.ymland all of them seem to comply except for SciLean withSciLean/Meta/Notation/Let', but they don't run this linter in CI. Also the Mathlib convention is aPrimesuffix instead of'.