lint: reenable revive unused-parameter check

Signed-off-by: Matt Souza <medsouz99@gmail.com>
This commit is contained in:
Matt Souza
2025-09-28 19:29:42 -04:00
parent 3747e3db3f
commit 090304a054
263 changed files with 723 additions and 724 deletions

View File

@ -71,6 +71,6 @@ func (p *PodmanTestIntegration) StartRemoteService() {
}
// Just a stub for compiling with `!remote`.
func getRemoteOptions(p *PodmanTestIntegration, args []string) []string {
func getRemoteOptions(_ *PodmanTestIntegration, _ []string) []string {
return nil
}

View File

@ -32,7 +32,7 @@ func pullChunkedTests() { // included in pull_test.go, must use a Ginkgo DSL at
// This is, nominally, a built-in feature of Ginkgo, but we run the tests with -vv, making the
// full output always captured in a log. So, here, we need to conditionalize explicitly.
var lastPullOutput bytes.Buffer
ReportAfterEach(func(ctx SpecContext, report SpecReport) {
ReportAfterEach(func(_ SpecContext, report SpecReport) {
if report.Failed() {
AddReportEntry("last pull operation", lastPullOutput.String())
}
@ -156,7 +156,7 @@ func pullChunkedTests() { // included in pull_test.go, must use a Ginkgo DSL at
modified[0] = digest.NewDigestFromEncoded(diffIDs[0].Algorithm(), hex.EncodeToString(digestBytes))
return modified
})
chunkedMissing = createChunkedImage("missing", func(diffIDs []digest.Digest) []digest.Digest {
chunkedMissing = createChunkedImage("missing", func(_ []digest.Digest) []digest.Digest {
return nil
})
chunkedEmpty = createChunkedImage("empty", func(diffIDs []digest.Digest) []digest.Digest {

View File

@ -424,7 +424,7 @@ qe ssh://root@podman.test:2222/run/podman/podman.sock ~/.ssh/id_rsa false true
pr.SetURL(baseURL)
},
Transport: &http.Transport{
DialContext: func(ctx context.Context, network, addr string) (net.Conn, error) {
DialContext: func(ctx context.Context, _, _ string) (net.Conn, error) {
defer GinkgoRecover()
By("Proxying to " + podmanTest.RemoteSocket)
url, err := url.Parse(podmanTest.RemoteSocket)

View File

@ -10,7 +10,7 @@ var createCmd = &cobra.Command{
Short: "create a volume",
Long: `Create a volume in the volume plugin listening on --sock-name`,
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, args []string) error {
return createVol(config.sockName, args[0])
},
}

View File

@ -11,7 +11,7 @@ var listCmd = &cobra.Command{
Short: "list all volumes",
Long: `List all volumes from the volume plugin listening on --sock-name`,
Args: cobra.NoArgs,
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, _ []string) error {
return listVol(config.sockName)
},
}

View File

@ -25,7 +25,7 @@ var serveCmd = &cobra.Command{
Short: "serve the volume plugin on the unix socket",
Long: `Creates simple directory volumes using the Volume Plugin API for testing volume plugin functionality`,
Args: cobra.NoArgs,
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, _ []string) error {
return startServer(config.sockName)
},
}
@ -52,7 +52,7 @@ func init() {
rootCmd.AddCommand(serveCmd, createCmd, removeCmd, listCmd)
}
func before(cmd *cobra.Command, args []string) error {
func before(_ *cobra.Command, _ []string) error {
if config.logLevel == "" {
config.logLevel = "error"
}

View File

@ -10,7 +10,7 @@ var removeCmd = &cobra.Command{
Short: "remove a volume",
Long: `Remove a volume in the volume plugin listening on --sock-name`,
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, args []string) error {
return removeVol(config.sockName, args[0])
},
}

View File

@ -31,7 +31,7 @@ func FakePodmanTestCreate() *FakePodmanTest {
return p
}
func (p *FakePodmanTest) makeOptions(args []string, options PodmanExecOptions) []string {
func (p *FakePodmanTest) makeOptions(args []string, _ PodmanExecOptions) []string {
return FakeOutputs[strings.Join(args, " ")]
}