Zulip Chat Archive
Stream: mathlib4
Topic: unusedArguments linter not referencing nolints
Yakov Pechersky (Oct 24 2022 at 03:29):
On my mathlib4#493, I am having lint failures on unusedArguments on Combinator.K
. which is def K (a : α) (_b : β) := a
. I thought _b
would be ignored, but seems it isn't? So I tried to add it to nolints.json
but maybe I don't have the syntax right for it.
Mario Carneiro (Oct 24 2022 at 03:33):
The unusedArguments linter does not respect _x
naming. I would just put @[nolint unusedArguments]
on the definition
Mario Carneiro (Oct 24 2022 at 03:35):
(note that there are two linters that detect unused arguments, a lean core linter and a mathlib linter, and this is the mathlib linter)
Yakov Pechersky (Oct 24 2022 at 03:43):
How did it happen that your PR passed the linters but the commits in my PR don't?
Yakov Pechersky (Oct 24 2022 at 04:50):
I'm unable to do so, since @[nolint unusedArguments]
doesn't work in Mathlib.Init.Core
Mario Carneiro (Oct 24 2022 at 05:42):
You can import Std.Tactic.Lint.Basic
to get @[nolint]
Last updated: Dec 20 2023 at 11:08 UTC