-
Notifications
You must be signed in to change notification settings - Fork 234
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] - chore: a non-lean linter for #-commands #10809
Conversation
This PR moves a `#guard_msgs` command from `LinearAlgebra/Matrix/PosDef` to a test file: it is a preparation for #10809.
Okay, not lovely, but better than nothing! :-) bors d+ |
✌️ adomani can now approve this pull request. To approve and merge a pull request, simply reply with |
Thanks for the approval and for merging the remaining "test" PR. I hope that this is just a temporary fix. I'm trying to see how actual Lean linters work and hopefully I'll be able to replace this one by a proper linter. |
bors r+ |
This PR introduces an `awk`-based linter for checking that `Mathlib/*.lean` files do not contain `#`-commands. It takes the names of the commands that begin with `#` by running ```lean import Mathlib #help command ``` and after that it is all text-based substitutions. It triggers an error on lines that begin with `#cmd`, omitting (most) lines contained comment blocks. CI for this PR should fail until #10772 and #10827 have been merged.
Pull request successfully merged into master. Build succeeded: |
This PR moves a `#guard_msgs` command from `LinearAlgebra/Matrix/PosDef` to a test file: it is a preparation for #10809.
This PR introduces an `awk`-based linter for checking that `Mathlib/*.lean` files do not contain `#`-commands. It takes the names of the commands that begin with `#` by running ```lean import Mathlib #help command ``` and after that it is all text-based substitutions. It triggers an error on lines that begin with `#cmd`, omitting (most) lines contained comment blocks. CI for this PR should fail until #10772 and #10827 have been merged.
I think this would have been better to add as an extra linter for the style linter python script. In the same way as we ban set option there. This would be a much less complicated way of doing things imo, and we would get things like reviewdog for free almost |
This PR moves a `#guard_msgs` command from `LinearAlgebra/Matrix/PosDef` to a test file: it is a preparation for #10809.
This PR introduces an `awk`-based linter for checking that `Mathlib/*.lean` files do not contain `#`-commands. It takes the names of the commands that begin with `#` by running ```lean import Mathlib #help command ``` and after that it is all text-based substitutions. It triggers an error on lines that begin with `#cmd`, omitting (most) lines contained comment blocks. CI for this PR should fail until #10772 and #10827 have been merged.
This PR moves a `#guard_msgs` command from `LinearAlgebra/Matrix/PosDef` to a test file: it is a preparation for #10809.
@alexjbest in case you are curious, I have a draft version of the same linter, but written in lean as a "syntax linter": #11019. If that one is preferred, then I am happy to remove this one! |
This PR moves a `#guard_msgs` command from `LinearAlgebra/Matrix/PosDef` to a test file: it is a preparation for #10809.
This PR introduces an `awk`-based linter for checking that `Mathlib/*.lean` files do not contain `#`-commands. It takes the names of the commands that begin with `#` by running ```lean import Mathlib #help command ``` and after that it is all text-based substitutions. It triggers an error on lines that begin with `#cmd`, omitting (most) lines contained comment blocks. CI for this PR should fail until #10772 and #10827 have been merged.
This PR moves a `#guard_msgs` command from `LinearAlgebra/Matrix/PosDef` to a test file: it is a preparation for #10809.
This PR introduces an `awk`-based linter for checking that `Mathlib/*.lean` files do not contain `#`-commands. It takes the names of the commands that begin with `#` by running ```lean import Mathlib #help command ``` and after that it is all text-based substitutions. It triggers an error on lines that begin with `#cmd`, omitting (most) lines contained comment blocks. CI for this PR should fail until #10772 and #10827 have been merged.
This PR moves a `#guard_msgs` command from `LinearAlgebra/Matrix/PosDef` to a test file: it is a preparation for #10809.
This PR introduces an `awk`-based linter for checking that `Mathlib/*.lean` files do not contain `#`-commands. It takes the names of the commands that begin with `#` by running ```lean import Mathlib #help command ``` and after that it is all text-based substitutions. It triggers an error on lines that begin with `#cmd`, omitting (most) lines contained comment blocks. CI for this PR should fail until #10772 and #10827 have been merged.
A Lean-linter implementation of the `#`-command linter introduced in #10809. This linter produces a warning whenever a non-allowed `#`-command is used. The allowed commands are ```lean #align #align_import #noalign #adaptation_note ``` [Zulip discussion](https://leanprover.zulipchat.com/#narrow/stream/144837-PR-reviews/topic/.2311019.3A.20a.20syntax.20linter.20for.20.23-commands) Co-authored-by: Michael Rothgang <rothgami@math.hu-berlin.de>
A Lean-linter implementation of the `#`-command linter introduced in #10809. This linter produces a warning whenever a non-allowed `#`-command is used. The allowed commands are ```lean #align #align_import #noalign #adaptation_note ``` [Zulip discussion](https://leanprover.zulipchat.com/#narrow/stream/144837-PR-reviews/topic/.2311019.3A.20a.20syntax.20linter.20for.20.23-commands) Co-authored-by: Michael Rothgang <rothgami@math.hu-berlin.de>
This PR introduces an
awk
-based linter for checking thatMathlib/*.lean
files do not contain#
-commands.It takes the names of the commands that begin with
#
by runningand after that it is all text-based substitutions.
It triggers an error on lines that begin with
#cmd
, omitting (most) lines contained comment blocks.CI for this PR should fail until #10772 and #10827 have been merged.
#10772 has been merged and the error message for the check decreased.
#10827 has been merged and the error message disappeared.