chore: enable use-any rule from revive by mmorel-35 · Pull Request #50672 · moby/moby · GitHub
Skip to content

chore: enable use-any rule from revive - #50672

Merged
thaJeztah merged 1 commit into
moby:masterfrom
mmorel-35:revive-use-any
Aug 8, 2025
Merged

thaJeztah merged 1 commit into
moby:masterfrom
mmorel-35:revive-use-any

Conversation

@mmorel-35

@mmorel-35 mmorel-35 commented Aug 8, 2025 •

Copy link
Copy Markdown
Contributor

- What I did

Use any instead of interface{}, enable use-any rule from revive alongside

- How I did it

- How to verify it

- Human readable description for the release notes

- A picture of a cute animal (not mandatory but encouraged)

@mmorel-35
mmorel-35 force-pushed the revive-use-any branch 3 times, most recently from 82833c8 to c2a561b Compare August 8, 2025 14:26
@thaJeztah thaJeztah added status/2-code-review kind/refactor PR's that refactor, or clean-up code labels Aug 8, 2025
@thaJeztah

Copy link
Copy Markdown
Member

@thaJeztah

Copy link
Copy Markdown
Member

Oh! and you missed one;

pkg/plugins/pluginrpc-gen/fixtures/foo.go:16:12: use-any: since Go 1.18 'interface{}' can be replaced by 'any' (revive)
type Fooer interface{

@thaJeztah thaJeztah added this to the 29.0.0 milestone Aug 8, 2025

@thaJeztah thaJeztah 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.

LGTM after fixing those two issues - let's see if we can get this one in to get it out of the way ❤️

@mmorel-35

Copy link
Copy Markdown
Contributor Author

I will skip pkg/plugins/pluginrpc-gen/fixtures/foo.go for now as it requires an adaptation of the script to handle them.
It worth an dedicated PR I believe

@thaJeztah

Copy link
Copy Markdown
Member

Yup, that makes sense as well. Same for the API package, because some of the generated files (which probably get ignored) also use interface{}.

@mmorel-35

Copy link
Copy Markdown
Contributor Author

Sorry, I've been slow to look at your other PRs because we've been busy on the modules work.

No worries, I totally understand that

Can you run hack/vendor.sh to update the vendoring (we currently vendor the client and api modules as they are separate now)

There are no changes for dependencies here

@thaJeztah

Copy link
Copy Markdown
Member

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
@thaJeztah
thaJeztah merged commit 90eef3f into moby:master Aug 8, 2025
@mmorel-35
mmorel-35 deleted the revive-use-any branch August 8, 2025 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/refactor PR's that refactor, or clean-up code status/2-code-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants