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

Fix remove_unused_variable rule #192

Merged
merged 6 commits into from
May 18, 2024
Merged

Conversation

jeparlefrancais
Copy link
Contributor

@jeparlefrancais jeparlefrancais commented May 15, 2024

Closes #182
Closes #186
Closes #187

These changes fixes the remove_unused_variable rule by removing the variables in the right order and fixing the scoping issue with repeat statements.

  • add entry to the changelog

Copy link

Coverage after merging fix-remove-unused-variable into main will be

86.98%

Coverage Report for Changed Files
FileStmtsBranchesFuncsLinesUncovered Lines
src/nodes/expressions
   type_cast.rs84.62%100%81.82%85.37%23–25, 35–37
src/nodes/statements
   repeat_statement.rs100%100%100%100%
src/process
   node_processor.rs97.92%100%97.92%97.92%43
   scope_visitor.rs86.01%100%91.89%85.16%109–111, 114, 118, 144–146, 149, 153, 182–184, 198, 202, 255–265, 270, 63–65, 78–80, 83, 87
   visitors.rs99.08%100%100%99%92–97
src/process/processors
   find_usage.rs100%100%100%100%
src/rules
   remove_unused_variable.rs96.88%100%100%96.53%138, 161–164, 166–167
src/utils
   expressions_as_statement.rs34.33%100%40%33.87%24–36, 44, 51–62, 64–73, 75

@jeparlefrancais jeparlefrancais merged commit dd8173b into main May 18, 2024
6 checks passed
@jeparlefrancais jeparlefrancais deleted the fix-remove-unused-variable branch May 18, 2024 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant