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

feat(gdtk-lint): unnecessary-branch #69

Merged
merged 7 commits into from
May 25, 2024
Merged

Conversation

elenakrittik
Copy link
Owner

@elenakrittik elenakrittik commented May 2, 2024

Implements the unnecessary-branch check which checks for else statements that are preceded by ifs/elifs that always return.

Blocked on #53's item #4

@elenakrittik elenakrittik added pr: feature Implements a feature request s: blocked Blocked by another issue c: gdtk-lint Crate: gdtk-lint a: parity Area: Feature parity with Godot and other tools labels May 2, 2024
@elenakrittik elenakrittik added s: done Resolved and removed s: blocked Blocked by another issue labels May 25, 2024
@elenakrittik elenakrittik marked this pull request as ready for review May 25, 2024 19:21
@elenakrittik
Copy link
Owner Author

The diagnostic for this is, mildly saying, subpar. However, it cannot be improved in the scope of this PR (requires at least making Diagnostic/Highlight own .span, and ideally "just" improving the output), and given that it's functional i'm inclined to merge it.

Also, all the BranchGroup logic sounds like something a future semantic analyzer should do, but, again, it's out-of-scope for this PR.

@elenakrittik elenakrittik merged commit 055fe35 into master May 25, 2024
3 checks passed
@elenakrittik elenakrittik mentioned this pull request May 25, 2024
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: parity Area: Feature parity with Godot and other tools c: gdtk-lint Crate: gdtk-lint pr: feature Implements a feature request s: done Resolved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant