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

Detect declared but unassigned variable #11

Open
nhthn opened this issue Oct 12, 2022 · 0 comments
Open

Detect declared but unassigned variable #11

nhthn opened this issue Oct 12, 2022 · 0 comments
Labels
linter feature Feature requests for the Linter

Comments

@nhthn
Copy link
Contributor

nhthn commented Oct 12, 2022

If a variable is declared with var but nothing is assigned to it before its first use, it probably means that an assignment was forgotten somewhere. If the intention is to make the variable nil, it should be explicitly assigned as var foo = nil.

@lnihlen lnihlen added the linter feature Feature requests for the Linter label Oct 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linter feature Feature requests for the Linter
Projects
None yet
Development

No branches or pull requests

2 participants