Skip to content

Commit

Permalink
chore: fix linting errors and update golangci-lint config
Browse files Browse the repository at this point in the history
Signed-off-by: Clément Nussbaumer <[email protected]>
  • Loading branch information
clementnuss committed Dec 12, 2023
1 parent e96ed6f commit efa0f7b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
8 changes: 2 additions & 6 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,10 @@ linters-settings:
- gocognit
- funlen
- gocyclo

linters:
disable-all: true
enable:
- bodyclose
- deadcode
- depguard
- dogsled
- dupl
- errcheck
Expand All @@ -71,19 +68,18 @@ linters:
- misspell
- nakedret
- prealloc
- protogetter
- rowserrcheck
- exportloopref
- staticcheck
- structcheck
- stylecheck
- sqlclosecheck
- typecheck
- unconvert
- unparam
- unused
- varcheck
- whitespace
- wsl
issues:
exclude:
# Very commonly not checked.
- 'Error return value of .(l.Sync|.*Close|.*.Write|.*Flush|os\.Remove(All)?|os\.(Un)?Setenv). is not checked'
Expand Down
2 changes: 1 addition & 1 deletion internal/servicecheck/servicecheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ func (c *Checker) MeIngress() (string, error) {
return skippedStr, nil
}

return c.doRequest(c.KubenurseIngressURL + "/alwayshappy")
return c.doRequest(c.KubenurseIngressURL + "/alwayshappy") //nolint:goconst // readability
}

// MeService checks if the kubenurse is reachable at the /alwayshappy endpoint through the kubernetes service
Expand Down
2 changes: 1 addition & 1 deletion internal/servicecheck/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func generateRoundTripper(extraCA string, insecure bool) (http.RoundTripper, err

// Append extra CA, if set
if extraCA != "" {
caCert, err := os.ReadFile(extraCA) //nolint:gosec // Intentionally included by the user.
caCert, err := os.ReadFile(extraCA) // Intentionally included by the user.
if err != nil {
return nil, fmt.Errorf("could not load certificate %s: %w", extraCA, err)
}
Expand Down

0 comments on commit efa0f7b

Please sign in to comment.