Skip to content

feat: lake: add support for running text linters from lake lint#13513

Merged
wkrozowski merged 42 commits into
leanprover:masterfrom
wkrozowski:wojciech/lake_textlinters2
Apr 28, 2026
Merged

feat: lake: add support for running text linters from lake lint#13513
wkrozowski merged 42 commits into
leanprover:masterfrom
wkrozowski:wojciech/lake_textlinters2

Conversation

@wkrozowski
Copy link
Copy Markdown
Contributor

@wkrozowski wkrozowski commented Apr 23, 2026

This PR extends lake lint --builtin-lint to also support text linters (i.e. those using logLint/logLintIf), in addition to the environment linters added in #13431. Text-linter warnings emitted during the build are persisted into each module's .olean via a new Lean.Linter.lintLogExt environment extension; lake lint re-runs the build for the target modules and reads the entries back, reporting them alongside the environment linter output.

wkrozowski and others added 30 commits April 10, 2026 09:36
Co-authored-by: Mac Malone <tydeu@hatpress.net>
Co-authored-by: Mac Malone <tydeu@hatpress.net>
Co-authored-by: Mac Malone <tydeu@hatpress.net>
Co-authored-by: Mac Malone <tydeu@hatpress.net>
Co-authored-by: Mac Malone <tydeu@hatpress.net>
@wkrozowski wkrozowski added the lake-ci Run all Lake tests label Apr 23, 2026
@github-actions github-actions Bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Apr 23, 2026
@mathlib-lean-pr-testing
Copy link
Copy Markdown

mathlib-lean-pr-testing Bot commented Apr 23, 2026

Mathlib CI status (docs):

  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase e3d42400cee1b49f643bd74a9ae06b4a026ae612 --onto 30a3fde8aa2968acce441fa37436e51acf55f376. You can force Mathlib CI using the force-mathlib-ci label. (2026-04-23 12:32:42)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase e3d42400cee1b49f643bd74a9ae06b4a026ae612 --onto 2e48cd293ae3d8743949baefe6788bd3089dbe13. You can force Mathlib CI using the force-mathlib-ci label. (2026-04-24 15:09:40)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase e3d42400cee1b49f643bd74a9ae06b4a026ae612 --onto 3c6317b6d77a565b4217532d1190ac6955dba842. You can force Mathlib CI using the force-mathlib-ci label. (2026-04-27 12:08:40)

@leanprover-bot
Copy link
Copy Markdown
Collaborator

Reference manual CI status:

  • ❗ Reference manual CI will not be attempted unless your PR branches off the nightly-with-manual branch. Try git rebase e3d42400cee1b49f643bd74a9ae06b4a026ae612 --onto 3fc99eef102549c743c6c63547983319bfae6f01. You can force reference manual CI using the force-manual-ci label. (2026-04-23 12:32:44)

@wkrozowski wkrozowski marked this pull request as ready for review April 23, 2026 15:38
@wkrozowski wkrozowski requested a review from tydeu as a code owner April 23, 2026 15:38
Comment thread src/lake/Lake/CLI/Main.lean Outdated
Copy link
Copy Markdown
Member

@tydeu tydeu left a comment

Choose a reason for hiding this comment

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

Looking good! I have only one major concern, which is how extensive you want the rebuild to be (see my comment below).

Comment thread src/lake/Lake/Build/Run.lean Outdated
Comment thread src/lake/Lake/Build/Module.lean Outdated
Copy link
Copy Markdown
Member

@tydeu tydeu left a comment

Choose a reason for hiding this comment

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

The design looks good! Just a few more minor notes.

Comment thread src/lake/Lake/CLI/Main.lean Outdated
Comment thread src/lake/Lake/CLI/Help.lean
@wkrozowski wkrozowski added this pull request to the merge queue Apr 28, 2026
Merged via the queue into leanprover:master with commit 1a15db6 Apr 28, 2026
19 checks passed
wkrozowski added a commit to wkrozowski/lean4 that referenced this pull request Apr 29, 2026
This PR upstreams `dupNamespace` linter from batteries to work with new
core environment linting framework, as a "clippy" linter - i.e. one that
is not enabled by default.

Stacked on top of leanprover#13513.

---------

Co-authored-by: Mac Malone <tydeu@hatpress.net>
Co-authored-by: Thomas R. Murrills <68410468+thorimur@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog-lake Lake lake-ci Run all Lake tests toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants