Lean 4 fork for HoTT-compatible kernel extensions (Path types, transport, HITs). Maintained against upstream leanprover/lean4.
This PR adds builtin environment linting support to Lake, accessible via `lake lint` flags. It also introduces two builtin linters upstreamed from Mathlib (`defLemma` and `checkUnivs`) and a `builtinLint` package configuration option. Builtin linting is triggered via flags on `lake lint`: - `--builtin-lint`: run default builtin linters (in addition to the lint driver if configured) - `--builtin-only`: run only builtin linters, skip the lint driver - `--clippy`: run only non-default (clippy) linters - `--lint-all`: run all builtin linters (default + clippy) - `--lint-only <name>`: run a specific builtin linter by name - Using `--clippy`, `--lint-all`, or `--lint-only` implicitly enables builtin lint mode The `builtinLint` package option is a tristate (`Option Bool`): - `true`: always run builtin lints via `lake lint`; when a lint driver is also configured, builtin lints run first, then the driver, and the command fails if either reports errors. - `false`: never run builtin lints automatically; `lake check-lint` fails unless a lint driver is configured. - `none` (default): currently equivalent to `false`; in a future release, `none` will fall back to builtin lints when no lint driver is configured. The linter framework introduces a `LintScope` enum (`.default`, `.clippy`, `.all`) replacing the previous boolean `clippy` parameter in `getChecks` and `formatLinterResults`. A `@[builtin_nolint]` attribute (available without imports) allows suppressing specific linters per declaration. --------- Co-authored-by: Mac Malone <tydeu@hatpress.net> Co-authored-by: Thomas R. Murrills <68410468+thorimur@users.noreply.github.com> |
||
|---|---|---|
| .claude | ||
| .github | ||
| .vscode | ||
| doc | ||
| images | ||
| releases_drafts | ||
| script | ||
| src | ||
| stage0 | ||
| tests | ||
| .gitattributes | ||
| .gitignore | ||
| .gitpod.Dockerfile | ||
| .gitpod.yml | ||
| .ignore | ||
| AGENTS.md | ||
| CMakeLists.txt | ||
| CMakePresets.json | ||
| CODEOWNERS | ||
| CONTRIBUTING.md | ||
| flake.lock | ||
| flake.nix | ||
| lean-toolchain | ||
| LICENSE | ||
| LICENSES | ||
| README.md | ||
| RELEASES.md | ||
This is the repository for Lean 4.
About
- Quickstart
- Homepage
- Theorem Proving Tutorial
- Functional Programming in Lean
- Documentation Overview
- Language Reference
- Release notes starting at v4.0.0-m3
- Examples
- External Contribution Guidelines
Installation
See Install Lean.
Contributing
Please read our Contribution Guidelines first.
Building from Source
See Building Lean.