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: cleanup golangci output in github actions #99

Merged
merged 1 commit into from
Feb 16, 2022
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: 1 addition & 0 deletions cmd/vela-kubernetes/apply_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ func TestKubernetes_Apply_Command(t *testing.T) {
Output: "json",
}

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

// nolint: gosec // testing purposes
want := exec.Command(
_kubectl,
fmt.Sprintf("--kubeconfig=%s", c.Path),
Expand Down
1 change: 1 addition & 0 deletions cmd/vela-kubernetes/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ func (c *Config) Validate() error {
return nil
}

// nolint: gomnd // ignore magic number
// Write creates a .kube/config file in the home directory of the current user.
func (c *Config) Write() error {
logrus.Trace("writing Kubernetes configuration file")
Expand Down
2 changes: 2 additions & 0 deletions cmd/vela-kubernetes/kubectl.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ func install(customVer, defaultVer string) error {
}

logrus.Debugf("changing ownership of file: %s", _kubectl)

// nolint: gomnd // ignore magic number
// ensure the kubectl binary is executable
err = a.Chmod(_kubectl, 0700)
if err != nil {
Expand Down
1 change: 1 addition & 0 deletions cmd/vela-kubernetes/patch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ func TestKubernetes_Patch_Command(t *testing.T) {
RawContainers: `[{"name": "container", "image": "alpine"}]`,
}

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

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