Skip to content

Commit d0212f9

Browse files
Merge pull request #27126 from medsouz/unused-parameter
lint: reenable revive unused-parameter check
2 parents f9de4b0 + 090304a commit d0212f9

File tree

263 files changed

+723
-724
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

263 files changed

+723
-724
lines changed

.golangci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ linters:
6464
revive:
6565
rules:
6666
- name: unused-parameter
67-
disabled: true
6867
exclusions:
6968
generated: strict
7069
presets:

cmd/podman-mac-helper/install.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ func init() {
8383
rootCmd.AddCommand(installCmd)
8484
}
8585

86-
func install(cmd *cobra.Command, args []string) error {
86+
func install(_ *cobra.Command, _ []string) error {
8787
userName, uid, homeDir, err := getUser()
8888
if err != nil {
8989
return err

cmd/podman-mac-helper/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ func addPrefixFlag(cmd *cobra.Command) {
142142
cmd.Flags().StringVar(&installPrefix, "prefix", defaultPrefix, "Sets the install location prefix")
143143
}
144144

145-
func silentUsage(cmd *cobra.Command, args []string) {
145+
func silentUsage(cmd *cobra.Command, _ []string) {
146146
cmd.SilenceUsage = true
147147
cmd.SilenceErrors = true
148148
}

cmd/podman-mac-helper/service.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func init() {
3131
rootCmd.AddCommand(serviceCmd)
3232
}
3333

34-
func serviceRun(cmd *cobra.Command, args []string) {
34+
func serviceRun(_ *cobra.Command, _ []string) {
3535
info, err := os.Stdin.Stat()
3636
if err != nil || info.Mode()&fs.ModeSocket == 0 {
3737
fmt.Fprintln(os.Stderr, "This is an internal command that is not intended for standard terminal usage")

cmd/podman-mac-helper/uninstall.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func init() {
2727
rootCmd.AddCommand(uninstallCmd)
2828
}
2929

30-
func uninstall(cmd *cobra.Command, args []string) error {
30+
func uninstall(_ *cobra.Command, _ []string) error {
3131
userName, _, homeDir, err := getUser()
3232
if err != nil {
3333
return err

cmd/podman-testing/create.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ func init() {
8888
flags.StringVarP(&createContainerOpts.Layer, "layer", "l", "", "ID of containers's read-write layer (default none)")
8989
}
9090

91-
func createStorageLayer(cmd *cobra.Command, args []string) error {
91+
func createStorageLayer(_ *cobra.Command, _ []string) error {
9292
results, err := testingEngine.CreateStorageLayer(mainContext, createStorageLayerOpts)
9393
if err != nil {
9494
return err
@@ -98,7 +98,7 @@ func createStorageLayer(cmd *cobra.Command, args []string) error {
9898
return nil
9999
}
100100

101-
func createLayer(cmd *cobra.Command, args []string) error {
101+
func createLayer(_ *cobra.Command, _ []string) error {
102102
results, err := testingEngine.CreateLayer(mainContext, createLayerOpts)
103103
if err != nil {
104104
return err
@@ -108,7 +108,7 @@ func createLayer(cmd *cobra.Command, args []string) error {
108108
return nil
109109
}
110110

111-
func createImage(cmd *cobra.Command, args []string) error {
111+
func createImage(_ *cobra.Command, _ []string) error {
112112
results, err := testingEngine.CreateImage(mainContext, createImageOpts)
113113
if err != nil {
114114
return err
@@ -118,7 +118,7 @@ func createImage(cmd *cobra.Command, args []string) error {
118118
return nil
119119
}
120120

121-
func createContainer(cmd *cobra.Command, args []string) error {
121+
func createContainer(_ *cobra.Command, _ []string) error {
122122
results, err := testingEngine.CreateContainer(mainContext, createContainerOpts)
123123
if err != nil {
124124
return err

cmd/podman-testing/data.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ func init() {
205205
flags.StringVarP(&removeContainerDataOpts.Key, "key", "k", "", "Name of the data item")
206206
}
207207

208-
func createLayerData(cmd *cobra.Command, args []string) error {
208+
func createLayerData(_ *cobra.Command, _ []string) error {
209209
if createLayerDataOpts.ID == "" {
210210
return errors.New("layer ID not specified")
211211
}
@@ -233,7 +233,7 @@ func createLayerData(cmd *cobra.Command, args []string) error {
233233
return nil
234234
}
235235

236-
func createImageData(cmd *cobra.Command, args []string) error {
236+
func createImageData(_ *cobra.Command, _ []string) error {
237237
if createImageDataOpts.ID == "" {
238238
return errors.New("image ID not specified")
239239
}
@@ -261,7 +261,7 @@ func createImageData(cmd *cobra.Command, args []string) error {
261261
return nil
262262
}
263263

264-
func createContainerData(cmd *cobra.Command, args []string) error {
264+
func createContainerData(_ *cobra.Command, _ []string) error {
265265
if createContainerDataOpts.ID == "" {
266266
return errors.New("container ID not specified")
267267
}
@@ -289,7 +289,7 @@ func createContainerData(cmd *cobra.Command, args []string) error {
289289
return nil
290290
}
291291

292-
func modifyLayerData(cmd *cobra.Command, args []string) error {
292+
func modifyLayerData(_ *cobra.Command, _ []string) error {
293293
if modifyLayerDataOpts.ID == "" {
294294
return errors.New("layer ID not specified")
295295
}
@@ -314,7 +314,7 @@ func modifyLayerData(cmd *cobra.Command, args []string) error {
314314
return nil
315315
}
316316

317-
func modifyImageData(cmd *cobra.Command, args []string) error {
317+
func modifyImageData(_ *cobra.Command, _ []string) error {
318318
if modifyImageDataOpts.ID == "" {
319319
return errors.New("image ID not specified")
320320
}
@@ -339,7 +339,7 @@ func modifyImageData(cmd *cobra.Command, args []string) error {
339339
return nil
340340
}
341341

342-
func modifyContainerData(cmd *cobra.Command, args []string) error {
342+
func modifyContainerData(_ *cobra.Command, _ []string) error {
343343
if modifyContainerDataOpts.ID == "" {
344344
return errors.New("container ID not specified")
345345
}
@@ -364,7 +364,7 @@ func modifyContainerData(cmd *cobra.Command, args []string) error {
364364
return nil
365365
}
366366

367-
func removeLayerData(cmd *cobra.Command, args []string) error {
367+
func removeLayerData(_ *cobra.Command, _ []string) error {
368368
if removeLayerDataOpts.ID == "" {
369369
return errors.New("layer ID not specified")
370370
}
@@ -378,7 +378,7 @@ func removeLayerData(cmd *cobra.Command, args []string) error {
378378
return nil
379379
}
380380

381-
func removeImageData(cmd *cobra.Command, args []string) error {
381+
func removeImageData(_ *cobra.Command, _ []string) error {
382382
if removeImageDataOpts.ID == "" {
383383
return errors.New("image ID not specified")
384384
}
@@ -392,7 +392,7 @@ func removeImageData(cmd *cobra.Command, args []string) error {
392392
return nil
393393
}
394394

395-
func removeContainerData(cmd *cobra.Command, args []string) error {
395+
func removeContainerData(_ *cobra.Command, _ []string) error {
396396
if removeContainerDataOpts.ID == "" {
397397
return errors.New("container ID not specified")
398398
}

cmd/podman-testing/layer.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func init() {
5454
flags.StringVarP(&modifyLayerFile, "file", "f", "", "archive of contents to extract over layer")
5555
}
5656

57-
func populateLayer(cmd *cobra.Command, args []string) error {
57+
func populateLayer(_ *cobra.Command, _ []string) error {
5858
if populateLayerOpts.ID == "" {
5959
return errors.New("layer ID not specified")
6060
}
@@ -73,7 +73,7 @@ func populateLayer(cmd *cobra.Command, args []string) error {
7373
return nil
7474
}
7575

76-
func modifyLayer(cmd *cobra.Command, args []string) error {
76+
func modifyLayer(_ *cobra.Command, _ []string) error {
7777
if modifyLayerOpts.ID == "" {
7878
return errors.New("layer ID not specified")
7979
}

cmd/podman-testing/main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ var (
2626
mainCmd = &cobra.Command{
2727
Use: "podman-testing",
2828
Long: "Assorted tools for use in testing podman",
29-
RunE: func(cmd *cobra.Command, args []string) error {
29+
RunE: func(cmd *cobra.Command, _ []string) error {
3030
return cmd.Help()
3131
},
32-
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
32+
PersistentPreRunE: func(_ *cobra.Command, _ []string) error {
3333
return before()
3434
},
35-
PersistentPostRunE: func(cmd *cobra.Command, args []string) error {
35+
PersistentPostRunE: func(_ *cobra.Command, _ []string) error {
3636
return after()
3737
},
3838
SilenceUsage: true,

cmd/podman-testing/remove.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ func init() {
8383
flags.StringVarP(&removeContainerOpts.ID, "container", "i", "", "ID of the container to remove")
8484
}
8585

86-
func removeStorageLayer(cmd *cobra.Command, args []string) error {
86+
func removeStorageLayer(_ *cobra.Command, _ []string) error {
8787
results, err := testingEngine.RemoveStorageLayer(mainContext, removeStorageLayerOpts)
8888
if err != nil {
8989
return err
@@ -92,7 +92,7 @@ func removeStorageLayer(cmd *cobra.Command, args []string) error {
9292
return nil
9393
}
9494

95-
func removeLayer(cmd *cobra.Command, args []string) error {
95+
func removeLayer(_ *cobra.Command, _ []string) error {
9696
results, err := testingEngine.RemoveLayer(mainContext, removeLayerOpts)
9797
if err != nil {
9898
return err
@@ -101,7 +101,7 @@ func removeLayer(cmd *cobra.Command, args []string) error {
101101
return nil
102102
}
103103

104-
func removeImage(cmd *cobra.Command, args []string) error {
104+
func removeImage(_ *cobra.Command, _ []string) error {
105105
results, err := testingEngine.RemoveImage(mainContext, removeImageOpts)
106106
if err != nil {
107107
return err
@@ -110,7 +110,7 @@ func removeImage(cmd *cobra.Command, args []string) error {
110110
return nil
111111
}
112112

113-
func removeContainer(cmd *cobra.Command, args []string) error {
113+
func removeContainer(_ *cobra.Command, _ []string) error {
114114
results, err := testingEngine.RemoveContainer(mainContext, removeContainerOpts)
115115
if err != nil {
116116
return err

0 commit comments

Comments
 (0)