leanprover / leanprover/lean4

lake lint: support excluding modules from linting

Open
#13,861 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

P-medium
Dominant language
Lean
Stars
9.2k
Forks
990
Avg merge
1d 17h
Merged PRs (30d)
175

Description

Projects that mix hand-written and auto-generated Lean code (e.g. from Aeneas) have no way to exclude generated modules from lake lint.

Currently, the only way to scope Batteries' runLinter to a subset of modules is to list the desired roots in lintDriverArgs. But those roots must be importable modules, which means creating barrel files that re-export every leaf module. These barrel files are in principle a source of conflict as they'd have to be committed.

Would it be possible to have an --exclude flag on lake lint?

Thank you,
Lacramioara

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how lake lint passes lintDriverArgs to Batteries' runLinter, then inspect where lint roots are resolved and how module imports are handled. Define completion as an --exclude option that lets projects omit generated modules without requiring barrel files, with coverage for the new argument behavior.

Written by the indexing model from the issue text.

Assessment

Domain
cli, compilers, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.