Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

refactor (rule/arguments-limits): replace AST walker by iteration over declarations #1159

Merged
merged 2 commits into from
Dec 4, 2024

Conversation

chavacava
Copy link
Collaborator

Simplifies arguments-limits rule by replacing AST walker by an iteration over global declarations

@chavacava chavacava changed the title refactor: replace AST walker by iteration over declarations refactor (rule/arguments-limits): replace AST walker by iteration over declarations Dec 4, 2024

ast.Walk(walker, file.AST)
if numParams > r.max {
Copy link
Contributor

Choose a reason for hiding this comment

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

I would have used

Suggested change
if numParams > r.max {
if numParams <= r.max {
continue
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

@chavacava chavacava merged commit c3b541f into master Dec 4, 2024
5 checks passed
@denisvmedia denisvmedia deleted the refactor/arguments-limit branch December 5, 2024 12:07
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants