Skip to content

Commit 4cdf899

Browse files
author
Mattia Bertorello
committed
Fixed all the problem reported by varcheck (unused variables)
1 parent 4942be4 commit 4cdf899

File tree

4 files changed

+10
-12
lines changed

4 files changed

+10
-12
lines changed

Diff for: .golangci.yml

-2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,4 @@ linters:
2828
- lll
2929
- maligned
3030
- megacheck
31-
- prealloc
3231
- unparam
33-
- varcheck

Diff for: commands/config/dump.go

+5-4
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,11 @@ func initDumpCommand() *cobra.Command {
3838
}
3939
}
4040

41-
var dumpFlags struct {
42-
_default bool // If false, ask questions to the user about setting configuration properties, otherwise use default configuration.
43-
location string // The custom location of the file to create.
44-
}
41+
// This struct is unused
42+
//var dumpFlags struct {
43+
// _default bool // If false, ask questions to the user about setting configuration properties, otherwise use default configuration.
44+
// location string // The custom location of the file to create.
45+
//}
4546

4647
func runDumpCommand(cmd *cobra.Command, args []string) {
4748
logrus.Info("Executing `arduino config dump`")

Diff for: commands/lib/uninstall.go

+5-4
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,11 @@ import (
2727
"github.com/spf13/cobra"
2828
)
2929

30-
const (
31-
versionAll string = "all"
32-
versionLatest string = "latest"
33-
)
30+
// These const are unused
31+
//const (
32+
// versionAll string = "all"
33+
// versionLatest string = "latest"
34+
//)
3435

3536
func initUninstallCommand() *cobra.Command {
3637
uninstallCommand := &cobra.Command{

Diff for: common/formatter/formatter.go

-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ var defaultFormatter Formatter
4242

4343
var logger *logrus.Logger
4444

45-
var debug bool
46-
4745
func init() {
4846
formatters = make(map[string]Formatter, 2)
4947
AddCustomFormatter("text", &TextFormatter{})

0 commit comments

Comments
 (0)