fix: make option linter.unusedSimpArgs respect linter.all#12560
Queued
fiforeach wants to merge 1 commit intoleanprover:masterfrom
Queued
fix: make option linter.unusedSimpArgs respect linter.all#12560fiforeach wants to merge 1 commit intoleanprover:masterfrom
linter.unusedSimpArgs respect linter.all#12560fiforeach wants to merge 1 commit intoleanprover:masterfrom
Conversation
mathlib-nightly-testing bot
pushed a commit
to leanprover-community/batteries
that referenced
this pull request
Feb 18, 2026
mathlib-nightly-testing bot
pushed a commit
to leanprover-community/mathlib4-nightly-testing
that referenced
this pull request
Feb 18, 2026
leanprover-bot
added a commit
to leanprover/reference-manual
that referenced
this pull request
Feb 18, 2026
Collaborator
|
Reference manual CI status:
|
grunweg
reviewed
Feb 18, 2026
Contributor
grunweg
left a comment
There was a problem hiding this comment.
Thanks for your PR! I am not affiliated to this repository, but I took a look anyway. This is what I would suggest. I can imagine some of these comments would be shared by reviewers from this repository.
Contributor
|
I found a few more linters with the same issue and fixed them in a separate PR. |
c2c559a to
92ecff7
Compare
grunweg
reviewed
Feb 19, 2026
Contributor
grunweg
left a comment
There was a problem hiding this comment.
Two more suggestions from the peanut gallery.
grunweg
reviewed
Feb 19, 2026
grunweg
reviewed
Feb 19, 2026
mathlib-nightly-testing bot
pushed a commit
to leanprover-community/batteries
that referenced
this pull request
Feb 19, 2026
mathlib-nightly-testing bot
pushed a commit
to leanprover-community/mathlib4-nightly-testing
that referenced
this pull request
Feb 19, 2026
leanprover-bot
added a commit
to leanprover/reference-manual
that referenced
this pull request
Feb 19, 2026
mathlib-nightly-testing bot
pushed a commit
to leanprover-community/batteries
that referenced
this pull request
Feb 19, 2026
mathlib-nightly-testing bot
pushed a commit
to leanprover-community/mathlib4-nightly-testing
that referenced
this pull request
Feb 19, 2026
leanprover-bot
added a commit
to leanprover/reference-manual
that referenced
this pull request
Feb 19, 2026
nomeata
approved these changes
Mar 3, 2026
|
Mathlib CI status (docs):
|
auto-merge was automatically disabled
March 3, 2026 12:49
Head branch was pushed to by a user without write access
Contributor
Author
github-merge-queue bot
pushed a commit
that referenced
this pull request
Mar 9, 2026
…ect linter.all (#12563) This PR makes the `omit`, `unusedSectionVars` and `loopingSimpArgs` linters respect the `linter.all` option: when `linter.all` is set to false (and the respective linter option is unset), the linter should not report errors. Similarly to #12559, these linters should honour the linter.all flag being set to false. These are all remaining occurrences of this pattern. This fixes an issue analogous to #12559. This PR and #12560 fix all occurrences of this pattern. (The only question is around `RCases.linter.unusedRCasesPattern`: should this also respect this? I have left this alone for now.) Co-authored-by: fiforeach <249703130+fiforeach@users.noreply.github.com>
This PR changes the way the linting for `linter.unusedSimpArgs` gets the value from the environment. This is achieved by using the appropriate helper functions defined in `Lean.Linter.Basic`. The following now compiles without warning ```lean4 set_option linter.all false in example : True := by simp [False] ``` Fixes leanprover#12559
Contributor
Author
|
@nomeata I rebased onto |
nomeata
approved these changes
Mar 9, 2026
Collaborator
|
Thanks! Squashing isn't necessary, we squash on merge and take PR description for the commit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR changes the way the linting for
linter.unusedSimpArgsgets the value from the environment. This is achieved by using the appropriate helper functions defined inLean.Linter.Basic.The following now compiles without warning
Fixes #12559