Skip to content
wvhullePublic

About

Linter for Lean, the proof assistant and programming language with auto-fixes and refactors. Mirror of Codeberg

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Repository files navigation

Heron

Heron finds non-idiomatic Lean 4 code and fixes it: in your editor, on lake build, and in CI.

def Weekday.isWeekend (day : Weekday) : Bool :=
  match day with
--^^^^^ Match on the parameters directly with `def f : A → B | pattern => …`
  | .saturday | .sunday => true
  | _ => false

The quick fix turns it into

def Weekday.isWeekend : Weekday → Bool
  | .saturday | .sunday => true
  | _ => false

The Id.run check in the editor

Documentation

  • Setup: add Heron to a Lake project, or use it without project changes, and pick the Heron ref for your Lean version
  • Install: the heron command, built from source or from Nix
  • Editor setup: heron serve in Helix, Neovim and VS Code
  • Rules: checks and refactors, listing them and turning them off
  • Architecture: how the targets, rules, server and release branches fit together
  • Style: which code patterns rules use and avoid
  • Development: the development environment, adding a rule, running the checks and releasing

Name

Heron

Named after the Heron bird that watches over lakes since lake (in turn named after "Lean make") is the name of the build tool for Lean.

About

Linter for Lean, the proof assistant and programming language with auto-fixes and refactors. Mirror of Codeberg

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages