Skip to content

feat: text-based linter against \t followed by tactic mode - #35524

Open
grunweg wants to merge 3 commits into
leanprover-community:masterfrom
grunweg:lint-trianglerewrite
Open

grunweg wants to merge 3 commits into
leanprover-community:masterfrom
grunweg:lint-trianglerewrite

Conversation

@grunweg

@grunweg grunweg commented Feb 19, 2026 •

Copy link
Copy Markdown
Contributor

Wait for the zulip discussion to converge. If there is consensus in favour of this change, summarise the motivation here.
#mathlib4 > Writer should use an additive monoid @ 💬


There are currently 80 remaining exceptions in mathlib: ideally, these would get fixed before merging this.
Works best when combined with #35523.

Open in Gitpod

@github-actions

github-actions Bot commented Feb 19, 2026 •

Copy link
Copy Markdown

PR summary 9587c3912a

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ triangleRewriteLinter

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 scripts/declarations_diff.sh contains some details about this script.


No changes to technical debt.

You can run this locally as

./scripts/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@joneugster joneugster left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me, subject to the Zulip discussion being approved unanimously.

Would it make sense to make use of the autofix feature the linter has?

Comment thread Mathlib/Tactic/Linter/TextBased.lean Resolved
@grunweg

grunweg commented Feb 19, 2026

Copy link
Copy Markdown
Contributor Author

I don't think this issue has an easy autofix: the triangle can rewrite in both directions, and sometimes (not always) you cannot put the rw first.

@grunweg grunweg added the awaiting-zulip There is a Zulip discussion; the author should await and report/implement the decision reached there label Feb 19, 2026
mathlib-bors Bot pushed a commit that referenced this pull request Feb 19, 2026
Not exhaustive. Will help with #35524.
Comment thread Mathlib/Tactic/Linter/TextBased.lean Resolved
Co-authored-by: Violeta Hernández Palacios <[email protected]>
pfaffelh pushed a commit to pfaffelh/mathlib4 that referenced this pull request Mar 2, 2026
@mathlib-merge-conflicts mathlib-merge-conflicts Bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Mar 17, 2026
@mathlib-merge-conflicts

Copy link
Copy Markdown

This pull request has conflicts, please merge master and resolve them.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-zulip There is a Zulip discussion; the author should await and report/implement the decision reached there merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) t-linter Linter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants