Skip to content

Commit

Permalink
Update golangci configuration ☕
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
vdemeester authored and tekton-robot committed May 7, 2020
1 parent 0ca6f6b commit 3f3a877
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
27 changes: 20 additions & 7 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,31 @@
run:
build-tags:
- e2e
skip-dirs:
- vendor
- pkg/client
timeout: 5m
linters-settings:
errcheck:
exclude: .errcheck.txt
linters:
disable-all: true
enable:
- errcheck
- gofmt
- goimports
- gosec
- gocritic
- golint
output:
uniq-by-line: false
issues:
exclude-rules:
- path: _test\.go
linters:
- errcheck
- gosec
max-issues-per-linter: 0
max-same-issues: 0
run:
issues-exit-code: 1
build-tags:
- e2e
skip-dirs:
- vendor
- pkg/client
timeout: 10m
modules-download-mode: vendor
3 changes: 1 addition & 2 deletions test/presubmit-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ source $(git rev-parse --show-toplevel)/vendor/github.com/tektoncd/plumbing/scri
function post_build_tests() {
header "running golangci-lint"
# deadline of 5m, and show all the issues
golangci-lint -j 1 --color=never \
run --modules-download-mode=vendor --max-issues-per-linter=0 --max-same-issues=0 --deadline 10m
golangci-lint -j 1 --color=never run
}

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

0 comments on commit 3f3a877

Please sign in to comment.