Kyle Miller
8e88e8061a
chore: deprecate := variants of inductive and structure ( #5542 )
...
Deprecates `inductive ... :=`, `structure ... :=`, and `class ... :=` in
favor of the `... where` variant. Currently this syntax produces a
warning, controlled by the `linter.deprecated` option.
Breaking change: modifies `Lean.Linter.logLintIf` to use
`Lean.Linter.getLinterValue` to determine if a linter value is set. This
means that the `linter.all` option now is taken into account when the
linter option is not set.
Part of #5236
2024-10-11 05:54:18 +00:00
Sebastian Ullrich
5651a11ac8
feat: improve unused section variable warning ( #5036 )
...
See
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Opt.20out.20of.20.22included.20section.20variable.20is.20not.20used.22.20linter
2024-08-22 10:18:09 +00:00
Scott Morrison
8b8e001794
chore: add missing copyright headers ( #3411 )
2024-02-20 01:49:55 +00:00
Henrik Böving
23e49eb519
perf: add prelude to all Lean modules
2024-02-18 14:55:17 -08:00
Mario Carneiro
c4cbefce11
feat: add linter.deprecated option to silence deprecation warnings
2022-10-23 21:11:57 +02:00
Sebastian Ullrich
2a977d8969
refactor: move unused variables linter into separate file
2022-07-29 10:31:19 -07:00
Lars
105bfcc8f0
feat: allow custom ignore functions for the unused variables linter
...
Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch>
2022-07-25 09:16:44 +02:00
larsk21
123fd801cb
doc: linter utils
2022-07-13 10:35:37 +02:00
larsk21
9980123291
fix: check if variables are used first
2022-07-13 10:35:37 +02:00
larsk21
70aff92f8f
fix: short-circuit ignore functions in unused variables linter
2022-07-13 10:35:37 +02:00
larsk21
9fcae6ffe9
fix: replace constant with opaque
2022-07-13 10:35:37 +02:00
larsk21
15f9c0585a
fix: consider macro expansions in unused variables linter
2022-07-13 10:35:37 +02:00
larsk21
ced8df3e86
fix: references of variables with equal ranges
2022-07-13 10:35:37 +02:00
Gabriel Ebner
a8cab84735
refactor: use computed fields for Expr
2022-07-11 14:19:41 -07:00
Sebastian Ullrich
a4236c0721
fix: ignore hygiened names in unused variables linter
2022-06-18 17:24:08 +02:00
Leonardo de Moura
22c8f10b12
chore: remove constant command
2022-06-14 17:14:28 -07:00
Leonardo de Moura
3a1dc5e066
fix: support new inductionAlt syntax at Linter/Basic.lean
2022-06-14 11:31:49 -07:00
Leonardo de Moura
bd2cccf287
chore: use double tick
2022-06-14 11:30:55 -07:00
Sebastian Ullrich
8c377436f4
fix: do not report unused variables in unfinished declarations
2022-06-10 11:27:11 +02:00
larsk21
60c8a72262
fix: unused variables linter: consider induction variables as pattern variables
2022-06-06 15:53:10 -07:00
larsk21
a9293410a2
fix: unused variables linter: ignore structure, class and inductive signatures
2022-06-06 15:53:10 -07:00
Sebastian Ullrich
3c41962275
refactor: Expr.forEach' use in unused variables linter
2022-06-05 14:16:40 +02:00
Sebastian Ullrich
05c5dd4441
fix: unused variables linter: search fvar aliases in tactics
2022-06-03 22:37:38 +02:00
Sebastian Ullrich
f3a7654a63
fix: unused variables linter: find nested uses in tactics
2022-06-03 22:37:38 +02:00
larsk21
caa8804a1d
feat: add nolint options for function arguments and pattern variables
2022-06-03 13:03:52 +02:00
larsk21
93480a3e05
fix: consider tactic mvar assignments for used variables
2022-06-03 13:03:52 +02:00
larsk21
bf907d7b8c
fix: ignore exposed function arguments in unused variables linter
2022-06-03 13:03:52 +02:00
larsk21
57c8c76cd0
fix: use findModuleRefs in unused variables linter
2022-06-03 13:03:52 +02:00
larsk21
cf4e106304
fix: unused variables linter review comments
...
- ignore unused variables in dep arrows
- avoid negated options
- make syntax stack generation more performant
- make ignore functions more extensible
- change message severity to `warning`
2022-06-03 13:03:52 +02:00
larsk21
37d5f8e74a
feat: add unused variables linter
2022-06-03 13:03:52 +02:00