Skip to content

Commit 2c9f59a

Browse files
Enable additional linters (#856)
Signed-off-by: Prajyot-Parab <[email protected]> Signed-off-by: Prajyot-Parab <[email protected]> Co-authored-by: Prajyot-Parab <[email protected]>
1 parent 2e5d678 commit 2c9f59a

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

.golangci.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
11
linters:
22
disable-all: true
33
enable:
4+
- asasalint
45
- asciicheck
56
- bodyclose
7+
- containedctx
8+
- decorder
69
- depguard
710
- dogsled
811
- errcheck
12+
- errchkjson
13+
- execinquery
914
- exportloopref
1015
- gci
1116
- goconst
1217
- gocritic
18+
- gocyclo
1319
- godot
1420
- gofmt
1521
- goimports
@@ -24,8 +30,10 @@ linters:
2430
- nilerr
2531
- noctx
2632
- nolintlint
33+
- nosprintfhostport
2734
- prealloc
2835
- predeclared
36+
- reassign
2937
- revive
3038
- rowserrcheck
3139
- staticcheck
@@ -35,6 +43,7 @@ linters:
3543
- unconvert
3644
- unparam
3745
- unused
46+
- usestdlibvars
3847
- whitespace
3948

4049
linters-settings:

pkg/cloud/services/utils/accounts.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import (
2929
func GetAccount(auth core.Authenticator) (string, error) {
3030
// fake request to get a barer token from the request header
3131
ctx := context.TODO()
32-
req, err := http.NewRequestWithContext(ctx, "GET", "http://example.com", http.NoBody)
32+
req, err := http.NewRequestWithContext(ctx, http.MethodGet, "http://example.com", http.NoBody)
3333
if err != nil {
3434
return "", err
3535
}

0 commit comments

Comments
 (0)