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

chore: enable receiver-naming from revive #21372

Merged
merged 1 commit into from
Jan 6, 2025

Conversation

mmorel-35
Copy link
Contributor

Description

receiver-naming: By convention, receiver names in a method should reflect their identity. For example, if the receiver is of type Parts, p is an adequate name for it. Contrary to other languages, it is not idiomatic to name receivers as this or self.

@mmorel-35 mmorel-35 requested a review from a team as a code owner January 4, 2025 12:33
Copy link

bunnyshell bot commented Jan 4, 2025

❌ Preview Environment deleted from Bunnyshell

Available commands (reply to this comment):

  • 🚀 /bns:deploy to deploy the environment

Copy link

codecov bot commented Jan 4, 2025

Codecov Report

Attention: Patch coverage is 72.11982% with 121 lines in your changes missing coverage. Please review.

Project coverage is 55.26%. Comparing base (cb3024c) to head (b61f361).

Files with missing lines Patch % Lines
server/server.go 70.27% 44 Missing and 11 partials ⚠️
pkg/apis/application/v1alpha1/repository_types.go 23.33% 23 Missing ⚠️
pkg/apis/application/v1alpha1/app_project_types.go 47.61% 22 Missing ⚠️
pkg/apis/application/v1alpha1/types.go 88.27% 15 Missing and 2 partials ⚠️
controller/sharding/cache.go 83.33% 2 Missing ⚠️
util/git/creds.go 90.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #21372      +/-   ##
==========================================
+ Coverage   55.20%   55.26%   +0.05%     
==========================================
  Files         337      337              
  Lines       57039    57039              
==========================================
+ Hits        31490    31521      +31     
+ Misses      22847    22821      -26     
+ Partials     2702     2697       -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mmorel-35 mmorel-35 force-pushed the revive/receiver-naming branch from a5a3791 to a17b60f Compare January 5, 2025 09:57
Copy link
Member

@reggie-k reggie-k left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! Those variable names are definitely clearer than before.

I think we can be even more consistent about the variable names: server *ArgoCDServer VS c HTTPSCreds VS ag *ApplicationGenerator - if the consideration for server was that argoCDServer is too long and it was always choosing the last word, then maybe creds HTTPSCreds? And maybe generator instead of ag , like in sharding *ClusterSharding?

@mmorel-35 mmorel-35 force-pushed the revive/receiver-naming branch 2 times, most recently from 9f2be7b to 1ae63fe Compare January 6, 2025 15:35
@mmorel-35 mmorel-35 force-pushed the revive/receiver-naming branch from 1ae63fe to b61f361 Compare January 6, 2025 16:55
@mmorel-35 mmorel-35 requested a review from reggie-k January 6, 2025 18:33
@crenshaw-dev crenshaw-dev merged commit c739478 into argoproj:master Jan 6, 2025
27 checks passed
@mmorel-35 mmorel-35 deleted the revive/receiver-naming branch January 6, 2025 19:50
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.

3 participants