Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This replace the current linter with the new moonpick linter. The new linter works against the parse tree instead of piggybacking on the compile process. Similarly to the old linter it detects global accesses and declared but unused variables. When it comes to unused variables it handles a lot more constructs, detecting unused variables resulting from destructuring statements, imports, etc. It also detects unused variables resulting from unused parameter declarations as well loop variable declarations. Another form of detection lacking altogether in the current linter is shadowing declarations, where a variable declaration of some sort shadows an existing declaration in an outer scope.
This PR removes the current
cmd.lint
module, replacing it with a newlint
module. It also adds alint_config.moon
and updates the current code to be lint clean for the new linter (two separate commits).Things to consider / be aware of are:
cmd.lint
module is removed. This was never advertised as a public API (AFAIK), but nonetheless it might have been used by other downstream projects.