Skip to content

Commit

Permalink
chore(linter): fix linter errors, remove deprecated allow leading spa…
Browse files Browse the repository at this point in the history
…ces (#57)

* chore(linter): fix linter errors, remove deprecated allow leading spaces

* chore(codeql): remove toolchain in go.mod to pass
  • Loading branch information
KellyMerrick authored Dec 13, 2023
1 parent dc52102 commit 9c50be7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
1 change: 0 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ linters-settings:

# https://github.com/golangci/golangci-lint/blob/master/pkg/golinters/nolintlint
nolintlint:
allow-leading-space: true # allow non-"machine-readable" format (ie. with leading space)
allow-unused: false # allow nolint directives that don't address a linting issue
require-explanation: true # require an explanation for nolint directives
require-specific: true # require nolint directives to be specific about which linter is being skipped
Expand Down
2 changes: 0 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ module github.com/go-vela/vela-npm

go 1.21

toolchain go1.21.5

require (
github.com/Masterminds/semver/v3 v3.2.1
github.com/go-vela/types v0.22.0
Expand Down
14 changes: 7 additions & 7 deletions internal/npm/plugin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func TestPlugin_createNpmrc_CreatesFile(t *testing.T) {
}
p, mock, fs := createTestPlugin(t, c)
home := path.Join("usr", "mctestface")
fs.MkdirAll(home, 0755) // nolint: errcheck // testing
fs.MkdirAll(home, 0755) //nolint:errcheck // testing
mock.
EXPECT().
GetHomeDir().
Expand Down Expand Up @@ -141,7 +141,7 @@ func TestPlugin_createNpmrc_AuthToken(t *testing.T) {
}
p, mock, fs := createTestPlugin(t, c)
home := path.Join("usr", "mctestface")
fs.MkdirAll(home, 0755) // nolint: errcheck // testing
fs.MkdirAll(home, 0755) //nolint:errcheck // testing
mock.
EXPECT().
GetHomeDir().
Expand Down Expand Up @@ -174,7 +174,7 @@ func TestPlugin_createNpmrc_Registry(t *testing.T) {
}
p, mock, fs := createTestPlugin(t, c)
home := path.Join("usr", "mctestface")
fs.MkdirAll(home, 0755) // nolint: errcheck // testing
fs.MkdirAll(home, 0755) //nolint:errcheck // testing
mock.
EXPECT().
GetHomeDir().
Expand Down Expand Up @@ -208,7 +208,7 @@ func TestPlugin_createNpmrc_Email(t *testing.T) {
}
p, mock, fs := createTestPlugin(t, c)
home := path.Join("usr", "mctestface")
fs.MkdirAll(home, 0755) // nolint: errcheck // testing
fs.MkdirAll(home, 0755) //nolint:errcheck // testing
mock.
EXPECT().
GetHomeDir().
Expand Down Expand Up @@ -243,7 +243,7 @@ func TestPlugin_createNpmrc_StrictSSLSet(t *testing.T) {
}
p, mock, fs := createTestPlugin(t, c)
home := path.Join("usr", "mctestface")
fs.MkdirAll(home, 0755) // nolint: errcheck // testing
fs.MkdirAll(home, 0755) //nolint:errcheck // testing
mock.
EXPECT().
GetHomeDir().
Expand Down Expand Up @@ -278,7 +278,7 @@ func TestPlugin_createNpmrc_AlwaysAuthSet(t *testing.T) {
}
p, mock, fs := createTestPlugin(t, c)
home := path.Join("usr", "mctestface")
fs.MkdirAll(home, 0755) // nolint: errcheck // testing
fs.MkdirAll(home, 0755) //nolint:errcheck // testing
mock.
EXPECT().
GetHomeDir().
Expand Down Expand Up @@ -317,7 +317,7 @@ func TestPlugin_createNpmrc_All(t *testing.T) {
}
p, mock, fs := createTestPlugin(t, c)
home := path.Join("usr", "mctestface")
fs.MkdirAll(home, 0755) // nolint: errcheck // testing
fs.MkdirAll(home, 0755) //nolint:errcheck // testing
mock.
EXPECT().
GetHomeDir().
Expand Down

0 comments on commit 9c50be7

Please sign in to comment.