Zulip Chat Archive

Stream: lean4

Topic: how to run linter


Asei Inoue (Nov 15 2024 at 17:24):

I would like to know how to use the docBlameThm linter.
It does not seem to be possible to enable it with set_option.

Johan Commelin (Nov 15 2024 at 17:43):

Add #lint to the bottom of your file.

Johan Commelin (Nov 15 2024 at 17:43):

You might need a suitable import. Do you want to run it on a file in a branch of mathlib, or in some other project?

Asei Inoue (Nov 15 2024 at 17:43):

in other project

Asei Inoue (Nov 15 2024 at 17:44):

How can I enable the linter for the whole project instead of on a file-by-file basis?

Kim Morrison (Nov 15 2024 at 19:39):

Look for how Mathlib or Batteries CI invokes runLinter.

Asei Inoue (Nov 16 2024 at 04:35):

@Kim Morrison
Thanks.
but why option version is missing? docBlameThm is useful linter...

Asei Inoue (Nov 17 2024 at 17:21):

Why is there both a linter executed via the #lint command and a linter executed via set_option in the first place...?

Asei Inoue (Nov 17 2024 at 17:22):

I would always find it more convenient for the linter to be able to switch between run/stop with set_option, is there a reason for this?

Kim Morrison (Nov 17 2024 at 22:20):

There are two completely independent sets of linters, environment linters controlled by #lint and runLinter, and syntax linters controlled by set_option. They have nothing to do with each other except the name.


Last updated: May 02 2025 at 03:31 UTC