Skip to content

chore: clean up unused parameters - #7060

Open
mmorel-35 wants to merge 6 commits into
moby:masterfrom
mmorel-35:unused-parameter
Open

chore: clean up unused parameters#7060
mmorel-35 wants to merge 6 commits into
moby:masterfrom
mmorel-35:unused-parameter

Conversation

@mmorel-35

Copy link
Copy Markdown
Contributor

Description

Enable and fixes several linters concerning unused parameters and parameters ordering (context-as-argument rule from revive)

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>

@tonistiigi tonistiigi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm not sure this is worth it. These names don't hurt readability and are sometimes actually helpful.

@mmorel-35

Copy link
Copy Markdown
Contributor Author

Would using an "_" prefix together with the appropriate "revive" configuration make this PR more acceptable? That would clearly distinguish intentionally unused parameters while still catching accidental ones. It would also enable linters like "contextcheck", helping avoid propagating "context.Context" where it isn't actually needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants