Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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