Mario Carneiro
c98deeb709
feat: @[unused_variables_ignore_fn] attribute ( #3184 )
...
This replaces the no-op `unusedVariablesIgnoreFnsExt` environment
extension with an actual environment extension which can be extended
using either `@[unused_variables_ignore_fn]` or
`@[builtin_unused_variables_ignore_fn]` (although for the present all
the builtin `unused_variables_ignore_fn`s are being added using direct
calls to `builtin_initialize addBuiltinUnusedVariablesIgnoreFn`, because
this also works and a stage0 update is required before the attribute can
be used).
We would like to use this attribute to disable unused variables in
syntaxes defined in std and mathlib, like
[`proof_wanted`](https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/Unused.20variables.20and.20proof_wanted/near/408554690 ).
2024-01-31 19:27:32 +00:00
Sebastian Ullrich
3335b2a01e
perf: improve avoidance of repeated Expr visits in unused variables linter ( #3076 )
...
-43% linter run time in a big proof case
2023-12-18 15:56:58 +00:00
Henrik
0d5f9122a1
perf: reduce allocations in unused variable linter
2023-09-18 05:41:37 -04:00
Henrik Böving
a6ae661195
feat: profiling of linters
2023-04-18 15:30:21 +02:00
Leonardo de Moura
30d625697e
chore: use Expr.forEachWhere to implement linter
...
closes #1899
TODO: use `Expr.forEachWhere` in other modules. There are many other opportunities.
2022-11-30 18:44:20 -08:00
Sebastian Ullrich
791fc70dd9
refactor: split paren parser
2022-11-11 13:45:41 +01:00
Mario Carneiro
c4cbefce11
feat: add linter.deprecated option to silence deprecation warnings
2022-10-23 21:11:57 +02:00
Mario Carneiro
583e023314
chore: snake-case attributes (part 2)
2022-10-19 09:28:08 -07:00
Mario Carneiro
dd5948d641
chore: snake-case attributes (part 1)
2022-10-19 09:28:08 -07:00
Sebastian Ullrich
e7b90b489a
fix: stabilize unused variables linter output
2022-10-13 10:46:53 +02:00
Mario Carneiro
391aef5cd7
feat: automatic extension names
2022-10-06 17:19:30 -07:00
Sebastian Ullrich
a03749cbe4
fix: findReferences should find only original syntax
2022-09-27 22:09:54 +02:00
Mario Carneiro
2270e8cd53
fix: ignore unused anonymous have variables
2022-09-27 22:09:54 +02:00
Mario Carneiro
ed6a5bba88
chore: rename insertAt to insertAt!
2022-09-19 13:49:20 -07:00
Mario Carneiro
6392c5b456
chore: import reductions
2022-09-15 14:02:38 -07:00
Sebastian Ullrich
b9152a5296
refactor: move, generalize findSyntaxStack?
2022-08-31 17:49:43 -07:00
Mario Carneiro
ebb5b97d73
chore: move Bootstrap.Data -> Lean.Data
2022-08-31 11:48:57 -07:00
Mario Carneiro
bf89c5a0f5
chore: move Std -> Bootstrap
2022-08-29 01:26:12 -07:00
Sebastian Ullrich
3ee9ab855e
fix: logging of linter warnings
2022-08-06 09:25:09 -07:00
Mario Carneiro
ea0f177bf2
feat: add unused/deprecation diagnostic tags
2022-08-05 17:45:50 +02:00
Sebastian Ullrich
abde2e4606
fix: unused variables in foreign definition
2022-08-03 18:15:15 -07:00
Mario Carneiro
c952c69690
feat: add missingDocs linter
2022-07-31 18:18:21 -07:00
Sebastian Ullrich
b027946496
feat: suffix linter messages with option name
2022-07-29 10:31:19 -07:00
Sebastian Ullrich
e048bbc93a
perf: unused variables linter: early cut-off
2022-07-29 10:31:19 -07:00
Sebastian Ullrich
2a977d8969
refactor: move unused variables linter into separate file
2022-07-29 10:31:19 -07:00