[Merged by Bors] - chore: import enabled mathlib syntax linters in Mathlib.Init#15845
[Merged by Bors] - chore: import enabled mathlib syntax linters in Mathlib.Init#15845
Mathlib.Init#15845Conversation
PR summary 7fb2b66537
|
| File | Base Count | Head Count | Change |
|---|---|---|---|
| Mathlib.Util.SleepHeartbeats | 2 | 12 | +10 (+500.00%) |
| Mathlib.Tactic.Linter.HashCommandLinter | 4 | 2 | -2 (-50.00%) |
| Mathlib.Tactic.Linter.Lint | 4 | 2 | -2 (-50.00%) |
| Mathlib.Tactic.Linter.UnusedTactic | 4 | 2 | -2 (-50.00%) |
| Mathlib.Tactic.Linter.GlobalAttributeIn | 3 | 2 | -1 (-33.33%) |
| Mathlib.Tactic.Linter.OldObtain | 3 | 2 | -1 (-33.33%) |
| Mathlib.Tactic.Linter.RefineLinter | 3 | 2 | -1 (-33.33%) |
| Mathlib.Tactic.Linter.Style | 3 | 2 | -1 (-33.33%) |
| Mathlib.Tactic.Linter | 15 | 19 | +4 (+26.67%) |
| Mathlib.Tactic.Subsingleton | 50 | 57 | +7 (+14.00%) |
Import changes for all files
| Files | Import difference |
|---|---|
| There are 4707 files with changed transitive imports taking up over 192447 characters: this is too many to display! | |
You can run scripts/import_trans_difference.sh all locally to see the whole output. |
Declarations diff
No declarations were harmed in the making of this PR! 🐙
You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>
## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>The doc-module for script/declarations_diff.sh contains some details about this script.
Mathlib.Init
e047aa9 to
4533aff
Compare
4533aff to
ee33037
Compare
|
I pushed a commit fixing almost all tests. |
|
!bench |
|
I'm not at a computer, but is the error just some whitespace noise? I'm only going by what I can see in the CI report, though. |
|
Here are the benchmark results for commit 3f6f538. |
|
Michael, thank you very much for using the file already! I took the liberty of fixing the failing I think that all transitive imports are acceptable now, but let's see what the others think about it! |
|
By the way, I am not completely sure about what changed with |
|
Oops, I merged master by mistake, sorry! By the way, I think that back-porting all the linting changes would be welcome! |
ceb84d4 to
9df35cf
Compare
Fix mathlib for running the missingEnd linter everywhere. Prerequiste to #15845.
9df35cf to
d8a7d6c
Compare
|
I have added a comment inlining Mathlib.Tactic.Linter: it only contained a single import now, and was only meaningfully imported in Mathlib.Tactic.Common. (And, to be honest, I'm not convinced importing it in |
Fix long lines, remove unused tactics and add missing end. The remaining changes are silencing linters, which cannot be backported. Split out from #15845.
|
CI passes now 🎉 |
|
bors merge |
These linters are meant to run on all of mathlib, but they need to be imported in order to run on a given file. Hence, move them to `Mathlib.Init`, which has precisely this purpose. All linters moved in this PR are syntax linters (which need to be imported to run) which are enabled by default. Linters missing from this list include - Linter/Textbased (which is not syntax-based) - Linter/MinImports (which is off by default) - Linter/HaveLet (which is disabled right now) All linters only have imports in `Lean`, except for `Linter/Lint` (which imports `Batteries.Tactic.Lint` to define an environment linter). This import could be avoided by splitting the environment linters into a different file; there is no need to import these syntax linters this early. Co-authored-by: adomani <adomani@gmail.com>
|
Build failed:
|
|
Looks like it needs another merge with |
|
✌️ grunweg can now approve this pull request. To approve and merge a pull request, simply reply with |
|
All CI steps pass (except linting, which passed in the previous commit). Thanks for the review! |
These linters are meant to run on all of mathlib, but they need to be imported in order to run on a given file. Hence, move them to `Mathlib.Init`, which has precisely this purpose. All linters moved in this PR are syntax linters (which need to be imported to run) which are enabled by default. Linters missing from this list include - Linter/Textbased (which is not syntax-based) - Linter/MinImports (which is off by default) - Linter/HaveLet (which is disabled right now) All linters only have imports in `Lean`, except for `Linter/Lint` (which imports `Batteries.Tactic.Lint` to define an environment linter). This import could be avoided by splitting the environment linters into a different file; there is no need to import these syntax linters this early. Co-authored-by: adomani <adomani@gmail.com>
|
Pull request successfully merged into master. Build succeeded: |
Mathlib.InitMathlib.Init
Fix mathlib for running the missingEnd linter everywhere. Prerequiste to #15845.
Fix long lines, remove unused tactics and add missing end commands. The remaining changes are silencing linters in `tests`, which cannot be backported. Split out from #15845.
These linters are meant to run on all of mathlib, but they need to be imported in order to run on a given file. Hence, move them to `Mathlib.Init`, which has precisely this purpose. All linters moved in this PR are syntax linters (which need to be imported to run) which are enabled by default. Linters missing from this list include - Linter/Textbased (which is not syntax-based) - Linter/MinImports (which is off by default) - Linter/HaveLet (which is disabled right now) All linters only have imports in `Lean`, except for `Linter/Lint` (which imports `Batteries.Tactic.Lint` to define an environment linter). This import could be avoided by splitting the environment linters into a different file; there is no need to import these syntax linters this early. Co-authored-by: adomani <adomani@gmail.com>
Fix mathlib for running the missingEnd linter everywhere. Prerequiste to #15845.
Fix long lines, remove unused tactics and add missing end commands. The remaining changes are silencing linters in `tests`, which cannot be backported. Split out from #15845.
These linters are meant to run on all of mathlib, but they need to be imported in order to run on a given file. Hence, move them to `Mathlib.Init`, which has precisely this purpose. All linters moved in this PR are syntax linters (which need to be imported to run) which are enabled by default. Linters missing from this list include - Linter/Textbased (which is not syntax-based) - Linter/MinImports (which is off by default) - Linter/HaveLet (which is disabled right now) All linters only have imports in `Lean`, except for `Linter/Lint` (which imports `Batteries.Tactic.Lint` to define an environment linter). This import could be avoided by splitting the environment linters into a different file; there is no need to import these syntax linters this early. Co-authored-by: adomani <adomani@gmail.com>
Fix mathlib for running the missingEnd linter everywhere. Prerequiste to #15845.
Fix long lines, remove unused tactics and add missing end commands. The remaining changes are silencing linters in `tests`, which cannot be backported. Split out from #15845.
These linters are meant to run on all of mathlib, but they need to be imported in order to run on a given file. Hence, move them to `Mathlib.Init`, which has precisely this purpose. All linters moved in this PR are syntax linters (which need to be imported to run) which are enabled by default. Linters missing from this list include - Linter/Textbased (which is not syntax-based) - Linter/MinImports (which is off by default) - Linter/HaveLet (which is disabled right now) All linters only have imports in `Lean`, except for `Linter/Lint` (which imports `Batteries.Tactic.Lint` to define an environment linter). This import could be avoided by splitting the environment linters into a different file; there is no need to import these syntax linters this early. Co-authored-by: adomani <adomani@gmail.com>
These linters are meant to run on all of mathlib, but they need to be imported in order to run on a given file.
Hence, move them to
Mathlib.Init, which has precisely this purpose.All linters moved in this PR are syntax linters (which need to be imported to run) which are enabled by default.
Linters missing from this list include
All linters only have imports in
Lean, except forLinter/Lint(which importsBatteries.Tactic.Lintto define an environment linter). This import could be avoided by splitting the environment linters into a different file; there is no need to import these syntax linters this early.semorrisonindicated that these linters are fine to import for now.Follow-up clean-ups, out of scope of this PR