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

[release-0.3] Enable additional linters #856

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
9 changes: 9 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
linters:
disable-all: true
enable:
- asasalint
- asciicheck
- bodyclose
- containedctx
- decorder
- depguard
- dogsled
- errcheck
- errchkjson
- execinquery
- exportloopref
- gci
- goconst
- gocritic
- gocyclo
- godot
- gofmt
- goimports
Expand All @@ -24,8 +30,10 @@ linters:
- nilerr
- noctx
- nolintlint
- nosprintfhostport
- prealloc
- predeclared
- reassign
- revive
- rowserrcheck
- staticcheck
Expand All @@ -35,6 +43,7 @@ linters:
- unconvert
- unparam
- unused
- usestdlibvars
- whitespace

linters-settings:
Expand Down
2 changes: 1 addition & 1 deletion pkg/cloud/services/utils/accounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
func GetAccount(auth core.Authenticator) (string, error) {
// fake request to get a barer token from the request header
ctx := context.TODO()
req, err := http.NewRequestWithContext(ctx, "GET", "http://example.com", http.NoBody)
req, err := http.NewRequestWithContext(ctx, http.MethodGet, "http://example.com", http.NoBody)
if err != nil {
return "", err
}
Expand Down