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 (#165)
  • Loading branch information
KellyMerrick authored Dec 13, 2023
1 parent 33ce3b1 commit 7a0e41c
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
3 changes: 1 addition & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ linters-settings:
locale: US

# 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)
nolintlint:
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
6 changes: 3 additions & 3 deletions cmd/vela-kubernetes/apply_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func TestKubernetes_Apply_Command(t *testing.T) {
Output: "json",
}

// nolint: gosec // testing purposes
//nolint:gosec // testing purposes
for _, file := range a.Files {
want := exec.Command(
_kubectl,
Expand Down Expand Up @@ -64,7 +64,7 @@ func TestKubernetes_Apply_Command_WithDryRunTrue(t *testing.T) {
Output: "json",
}

// nolint: gosec // testing purposes
//nolint:gosec // testing purposes
for _, file := range a.Files {
want := exec.Command(
_kubectl,
Expand Down Expand Up @@ -102,7 +102,7 @@ func TestKubernetes_Apply_Command_WithDryRunAnythingNonBoolean(t *testing.T) {
Output: "json",
}

// nolint: gosec // testing purposes
//nolint:gosec // testing purposes
for _, file := range a.Files {
want := exec.Command(
_kubectl,
Expand Down
2 changes: 1 addition & 1 deletion cmd/vela-kubernetes/command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func TestKubernetes_versionCmd(t *testing.T) {
Path: "~/.kube/config",
}

// nolint: gosec // testing purposes
//nolint:gosec // testing purposes
want := exec.Command(
_kubectl,
fmt.Sprintf("--kubeconfig=%s", c.Path),
Expand Down
2 changes: 1 addition & 1 deletion cmd/vela-kubernetes/patch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func TestKubernetes_Patch_Command(t *testing.T) {
RawContainers: `[{"name": "container", "image": "alpine"}]`,
}

// nolint: gosec // testing purposes
//nolint:gosec // testing purposes
for _, file := range p.Files {
for _, container := range p.Containers {
pattern := fmt.Sprintf(patchPattern, container.Name, container.Image)
Expand Down
2 changes: 1 addition & 1 deletion cmd/vela-kubernetes/status_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func TestKubernetes_Status_Command(t *testing.T) {
Watch: true,
}

// nolint: gosec // testing purposes
//nolint:gosec // testing purposes
for _, resource := range s.Resources {
want := exec.Command(
_kubectl,
Expand Down

0 comments on commit 7a0e41c

Please sign in to comment.