Skip to content

chore: enable use-any rule from revive#50672

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

chore: enable use-any rule from revive#50672
thaJeztah merged 1 commit intomoby:masterfrom
mmorel-35:revive-use-any

Conversation

@mmorel-35
Copy link
Contributor

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

- 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
Member

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

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

@thaJeztah
Copy link
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
Copy link
Member

@thaJeztah thaJeztah left a comment

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
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
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
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
Member

Can you try running it? At least I get a diff locally;

hack/vendor.sh
# ....

git status
On branch revive-use-any
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   vendor/github.com/moby/moby/client/hijack.go
	modified:   vendor/github.com/moby/moby/client/request.go

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
@thaJeztah thaJeztah merged commit 90eef3f into moby:master Aug 8, 2025
175 checks passed
@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