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 unused-parameter from revive #8625

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mmorel-35
Copy link
Contributor

@mmorel-35 mmorel-35 commented Jan 17, 2025

Thank you for contributing to Velero!

Please add a summary of your change

enable and fixes unused-parameter rule from revive

Does your change fix a particular issue?

Fixes #(issue)

Please indicate you've done the following:

@mmorel-35
Copy link
Contributor Author

/kind changelog-not-required

@github-actions github-actions bot added the kind/changelog-not-required PR does not require a user changelog. Often for docs, website, or build changes label Jan 17, 2025
Copy link

codecov bot commented Jan 17, 2025

Codecov Report

Attention: Patch coverage is 37.03704% with 102 lines in your changes missing coverage. Please review.

Project coverage is 59.34%. Comparing base (5b1738a) to head (327ec28).

Files with missing lines Patch % Lines
pkg/plugin/framework/volume_snapshotter_server.go 0.00% 7 Missing ⚠️
pkg/repository/provider/restic.go 0.00% 7 Missing ⚠️
pkg/plugin/framework/object_store_server.go 0.00% 6 Missing ⚠️
pkg/util/kube/predicate.go 0.00% 6 Missing ⚠️
pkg/plugin/framework/action_resolver.go 0.00% 5 Missing ⚠️
pkg/datapath/micro_service_watcher.go 0.00% 4 Missing ⚠️
pkg/cmd/cli/snapshotlocation/set.go 0.00% 3 Missing ⚠️
pkg/controller/gc_controller.go 0.00% 3 Missing ⚠️
...reitemaction/v2/restartable_restore_item_action.go 0.00% 3 Missing ⚠️
pkg/cmd/cli/install/install.go 0.00% 2 Missing ⚠️
... and 45 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8625      +/-   ##
==========================================
+ Coverage   59.33%   59.34%   +0.01%     
==========================================
  Files         370      370              
  Lines       39932    39932              
==========================================
+ Hits        23692    23697       +5     
+ Misses      14744    14739       -5     
  Partials     1496     1496              

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

@mmorel-35 mmorel-35 force-pushed the revive/unused-parameter branch from 0ffabfd to 3405568 Compare January 17, 2025 07:35
@mmorel-35 mmorel-35 force-pushed the revive/unused-parameter branch 3 times, most recently from 79d8659 to 1e9464a Compare January 17, 2025 14:36
@mmorel-35 mmorel-35 force-pushed the revive/unused-parameter branch 11 times, most recently from 4552df2 to 1edf3b7 Compare January 17, 2025 22:24
@mmorel-35 mmorel-35 force-pushed the revive/unused-parameter branch from 1edf3b7 to 327ec28 Compare January 17, 2025 22:28
@mmorel-35 mmorel-35 marked this pull request as ready for review January 17, 2025 22:32
@reasonerjt
Copy link
Contributor

Thanks for the PR!

I believe this rule has some negative effects.
When we want to use a parameter in the func which is not used before, the name of the parameter, though it's not used, is helpful to help the developer understand how it should be used.

for example, when you change "func f(BackupID string)" to "func f(_ string)", it makes the future change a little more difficult.

Copy link
Contributor

@reasonerjt reasonerjt left a comment

Choose a reason for hiding this comment

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

I'm blocking this PR until the maintainers reach agreement regarding whether the rule should be enforced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has-e2e-2tests has-unit-tests kind/changelog-not-required PR does not require a user changelog. Often for docs, website, or build changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants