Skip to content

Commit 9736eb3

Browse files
authored
Merge pull request #603 from tdakkota/ci/update-golangci-config
ci: update `.golangci.yml` due to `golangci-lint` release
2 parents 4f6109a + 2de0d4a commit 9736eb3

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

.golangci.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,9 @@ linters-settings:
2323
- hugeParam
2424
- rangeValCopy
2525
- exitAfterDefer
26-
- whyNoLint
27-
- appendAssign
2826
- octalLiteral
2927
- httpNoBody
3028
- unnecessaryBlock # for UUID encoder
31-
- paramTypeCombine # https://github.com/go-critic/go-critic/issues/1248, waiting for 0.6.5 bundled with golangci-lint
3229

3330
linters:
3431
enable:
@@ -96,7 +93,7 @@ issues:
9693
text: 'declaration of "(err|ctx|log)"'
9794

9895
# Ignore linters in main packages.
99-
- path: cmd\/.+\/main\.go
96+
- path: (cmd|tools)
10097
linters: [ goconst, funlen, gocognit, gocyclo ]
10198

10299
# TODO(tdakkota): add comments?
@@ -106,23 +103,23 @@ issues:
106103

107104
# We don't need package comments for internal packages.
108105
# We don't need comments for command packages.
109-
- path: .*(cmd|tools|internal)(\/|\\).*
106+
- path: (cmd|tools|internal)
110107
linters: [ revive, golint ]
111108
text: "should have (comment.+or be unexported|a package comment)"
112109

113110
# Intended in commands:
114111
# G307: Deferring unsafe method "Close" on type "*os.File"
115112
# G304: Potential file inclusion via variable
116-
- path: .*(cmd|tools)(\/|\\).+(\/|\\).+\.go
113+
- path: (cmd|tools)
117114
text: G(304|306|307)
118115

119116
# Nobody cares.
120117
# G114: Use of net/http serve function that has no support for setting timeouts
121-
- path: techempower(\/|\\)main.go
118+
- path: techempower
122119
text: G114
123120

124121
# We are using quoting algorithm from mime/multipart package. False-positive.
125-
- path: http(\/|\\)file\.go
122+
- path: http[/\\]file\.go
126123
linters: [ gocritic ]
127124
text: sprintfQuotedString
128125

@@ -132,6 +129,3 @@ issues:
132129
- linters: [ goconst ]
133130
text: 'string `(Unix|unix|date|time)'
134131

135-
- linters: [ revive ]
136-
text: "if-return: redundant if ...; err != nil check, just return error instead."
137-

0 commit comments

Comments
 (0)