Skip to content

Commit

Permalink
chore: cleanup golangci output in github actions (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaymckay committed Feb 16, 2022
1 parent 3716ac8 commit f546acc
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 0 deletions.
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

0 comments on commit f546acc

Please sign in to comment.