1
0
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:
Vince Prignano
2023-10-26 14:59:35 -07:00
parent 22c6bde87b
commit b199f34775
2 changed files with 33 additions and 3 deletions

View File

@@ -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

View File

@@ -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 "${@}"