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

refactor (rule/get-return): replace AST walker by iteration over declarations #1168

Merged
merged 2 commits into from
Dec 7, 2024

Conversation

chavacava
Copy link
Collaborator

Simplifies get-return rule by replacing AST walker by an iteration over global declarations

continue
}

if !hasResults(fd.Type.Results) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if !hasResults(fd.Type.Results) {
if hasResults(fd.Type.Results) {
continue
}

Also it's easier to read it continues if it has results, instead of the negation

@chavacava chavacava merged commit 3e1dbc0 into master Dec 7, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants