mirror of
https://github.com/openshift/installer.git
synced 2026-02-05 15:47:14 +01:00
Revisit linters, enable parallel workers
Signed-off-by: Vince Prignano <vincepri@redhat.com>
This commit is contained in:
@@ -9,8 +9,9 @@ run:
|
||||
- ^scripts
|
||||
- ^terraform
|
||||
- ^upi
|
||||
go: '1.19'
|
||||
go: '1.20'
|
||||
modules-download-mode: vendor
|
||||
allow-parallel-runners: true
|
||||
output:
|
||||
print-linter-name: true
|
||||
sort-results: true
|
||||
@@ -20,7 +21,6 @@ linters:
|
||||
- asciicheck
|
||||
- containedctx
|
||||
- decorder
|
||||
- depguard
|
||||
- dogsled
|
||||
- errcheck
|
||||
- errorlint
|
||||
@@ -128,7 +128,37 @@ linters-settings:
|
||||
# It's a comma-separated list of prefixes.
|
||||
# Default: ""
|
||||
local-prefixes: github.com/openshift
|
||||
revive:
|
||||
rules:
|
||||
# The following rules are recommended https://github.com/mgechev/revive#recommended-configuration
|
||||
- name: blank-imports
|
||||
- name: context-as-argument
|
||||
- name: context-keys-type
|
||||
- name: dot-imports
|
||||
- name: error-return
|
||||
- name: error-strings
|
||||
- name: error-naming
|
||||
- name: exported
|
||||
- name: if-return
|
||||
- name: increment-decrement
|
||||
- name: var-naming
|
||||
- name: var-declaration
|
||||
- name: range
|
||||
- name: receiver-naming
|
||||
- name: time-naming
|
||||
- name: unexported-return
|
||||
- name: indent-error-flow
|
||||
- name: errorf
|
||||
- name: superfluous-else
|
||||
- name: unreachable-code
|
||||
- name: redefines-builtin-id
|
||||
- name: bool-literal-in-expr
|
||||
- name: constant-logical-expr
|
||||
issues:
|
||||
include:
|
||||
- EXC0012 # EXC0012 revive: issue about not having a comment on exported.
|
||||
- EXC0014 # EXC0014 revive: issue about not having a comment in the right format.
|
||||
exclude-rules:
|
||||
- linters:
|
||||
- goconst
|
||||
path: _test\.go
|
||||
|
||||
@@ -6,4 +6,4 @@ podman run --rm \
|
||||
--volume "${PWD}:/go/src/github.com/openshift/installer:z" \
|
||||
--workdir /go/src/github.com/openshift/installer \
|
||||
docker.io/golangci/golangci-lint:v1.53.1 \
|
||||
golangci-lint run "${@}"
|
||||
golangci-lint run --new-from-rev=dcf8122 "${@}"
|
||||
|
||||
Reference in New Issue
Block a user