Skip to content

perf: run linters only on public imports#1688

Open
JovanGerb wants to merge 4 commits intoleanprover-community:mainfrom
JovanGerb:Jovan-lint-public
Open

perf: run linters only on public imports#1688
JovanGerb wants to merge 4 commits intoleanprover-community:mainfrom
JovanGerb:Jovan-lint-public

Conversation

@JovanGerb
Copy link
Copy Markdown
Contributor

@JovanGerb JovanGerb commented Feb 21, 2026

This PR lets the runLinter command participate in the module system. In particular, linters now only run on exported data. We need to have access to doc-strings for the docBlame linter, so we have to use the .server level of imports instead of .exported.

The docBlame linter had to be fixed, because it was detecting imported theorems as axioms.

Is there any linter that requires access to private information from modules?

@github-actions github-actions bot added the awaiting-review This PR is ready for review; the author thinks it is ready to be merged. label Feb 21, 2026
mathlib-nightly-testing bot added a commit to leanprover-community/mathlib4-nightly-testing that referenced this pull request Feb 21, 2026
mathlib-nightly-testing bot added a commit to leanprover-community/mathlib4-nightly-testing that referenced this pull request Feb 21, 2026
| .axiomInfo .. => pure "axiom"
| .opaqueInfo .. => pure "constant"
| .defnInfo info =>
-- leanprover/lean4#2575: Prop projections are generated as `def`s
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This lean issue has been resolved in the meantime

@JovanGerb
Copy link
Copy Markdown
Contributor Author

The mathlib branch doesn't build, because there are various instances of private declarations appearning in the public scope (which is not meant to be allowed). So this PR will have to wait.

@fgdorais fgdorais added breaks-mathlib awaiting-author Waiting for PR author to address issues and removed awaiting-review This PR is ready for review; the author thinks it is ready to be merged. labels Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-author Waiting for PR author to address issues breaks-mathlib

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants