Skip to content

Commit 3f3a877

Browse files
vdemeestertekton-robot
authored andcommitted
Update golangci configuration ☕
This removes some flags that are now in the configuration, and add more information. Trying `disable-all` with `enable` to limit the linter run to only the one we specify. Also trying to run less linters on `_test.go`. Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
1 parent 0ca6f6b commit 3f3a877

File tree

2 files changed

+21
-9
lines changed

2 files changed

+21
-9
lines changed

.golangci.yml

+20-7
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,31 @@
1-
run:
2-
build-tags:
3-
- e2e
4-
skip-dirs:
5-
- vendor
6-
- pkg/client
7-
timeout: 5m
81
linters-settings:
92
errcheck:
103
exclude: .errcheck.txt
114
linters:
5+
disable-all: true
126
enable:
137
- errcheck
148
- gofmt
159
- goimports
1610
- gosec
1711
- gocritic
1812
- golint
13+
output:
14+
uniq-by-line: false
15+
issues:
16+
exclude-rules:
17+
- path: _test\.go
18+
linters:
19+
- errcheck
20+
- gosec
21+
max-issues-per-linter: 0
22+
max-same-issues: 0
23+
run:
24+
issues-exit-code: 1
25+
build-tags:
26+
- e2e
27+
skip-dirs:
28+
- vendor
29+
- pkg/client
30+
timeout: 10m
31+
modules-download-mode: vendor

test/presubmit-tests.sh

+1-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ source $(git rev-parse --show-toplevel)/vendor/github.com/tektoncd/plumbing/scri
3232
function post_build_tests() {
3333
header "running golangci-lint"
3434
# deadline of 5m, and show all the issues
35-
golangci-lint -j 1 --color=never \
36-
run --modules-download-mode=vendor --max-issues-per-linter=0 --max-same-issues=0 --deadline 10m
35+
golangci-lint -j 1 --color=never run
3736
}
3837

3938
# We use the default build, unit and integration test runners.

0 commit comments

Comments
 (0)