Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linter for unused variable declarations #18720

Open
madvorak opened this issue Nov 7, 2024 · 2 comments
Open

Linter for unused variable declarations #18720

madvorak opened this issue Nov 7, 2024 · 2 comments
Labels
RFC Request for comment

Comments

@madvorak
Copy link
Collaborator

madvorak commented Nov 7, 2024

In the same way we have a linter for to detect an unused argument of a function or lemma, we should have a linter to detect an unused variable declaration. I realized we have many of them.

@madvorak madvorak added the RFC Request for comment label Nov 7, 2024
@b-mehta
Copy link
Contributor

b-mehta commented Nov 21, 2024

cc @adomani who has a version of this and has applied it in mathlib a few times.

@adomani
Copy link
Collaborator

adomani commented Nov 21, 2024

I agree! There is a linter at #17715, but there are thousands of unused variables and I am still honing the logic behind the linter.

Once I fixed the currently known false positives, I'll probably ask for help removing the exceptions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFC Request for comment
Projects
None yet
Development

No branches or pull requests

3 participants