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/modifies-value-receiver): replace AST walker by iteration over declarations #1165

Merged
merged 2 commits into from
Dec 4, 2024

Conversation

chavacava
Copy link
Collaborator

Simplifies modifies-value-receiver rule by replacing AST walker by an iteration over global declarations

return false
}

func (r *ModifiesValRecRule) getAssignmentsToReceiver(receiverName string, funcBody *ast.BlockStmt) []ast.Node {
Copy link
Collaborator

Choose a reason for hiding this comment

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

ModifiesValRecRule seems to have a mixed receiver type, which is not recommended. I think they should all be pointers in this case.

@chavacava chavacava merged commit a31d5af into master Dec 4, 2024
5 checks passed
@denisvmedia denisvmedia deleted the refactor/modifies-value-receiver branch December 5, 2024 12:05
# 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.

2 participants