feat(linters): Temporarily disable most linters

This commit is contained in:
Artem Yadelskyi 2026-02-16 17:13:35 +02:00
parent d69ef653df
commit d9b5f64777
No known key found for this signature in database
2 changed files with 56 additions and 7 deletions

View file

@ -7,8 +7,6 @@ jobs:
lint: lint:
name: Linter name: Linter
runs-on: ubuntu-latest runs-on: ubuntu-latest
# TODO: Remove continue-on-error once linter issues are fixed
continue-on-error: true
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v6 uses: actions/checkout@v6
@ -29,7 +27,7 @@ jobs:
with: with:
version: latest version: latest
# TODO: Remove once linter job is required # TODO: Remove once linter is properly configured
fmt-check: fmt-check:
name: Formatting name: Formatting
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -47,7 +45,7 @@ jobs:
make fmt make fmt
git diff --exit-code || (echo "::error::Code is not formatted. Run 'make fmt' and commit the changes." && exit 1) git diff --exit-code || (echo "::error::Code is not formatted. Run 'make fmt' and commit the changes." && exit 1)
# TODO: Remove once linter job is required # TODO: Remove once linter is properly configured
vet: vet:
name: Vet name: Vet
runs-on: ubuntu-latest runs-on: ubuntu-latest

View file

@ -26,6 +26,52 @@ linters:
- wrapcheck - wrapcheck
- wsl - wsl
- wsl_v5 - wsl_v5
# TODO: Disabled, because they are failing at the moment, we should fix them and enable (step by step)
- bodyclose
- contextcheck
- dogsled
- embeddedstructfieldcheck
- errcheck
- errchkjson
- errorlint
- exhaustive
- forbidigo
- forcetypeassert
- funlen
- gochecknoinits
- gocognit
- goconst
- gocritic
- gocyclo
- godox
- goprintffuncname
- gosec
- govet
- ineffassign
- lll
- maintidx
- misspell
- mnd
- modernize
- nakedret
- nestif
- nilnil
- paralleltest
- perfsprint
- prealloc
- predeclared
- revive
- staticcheck
- tagalign
- testifylint
- thelper
- unparam
- unused
- usestdlibvars
- usetesting
- wastedassign
- whitespace
settings: settings:
errcheck: errcheck:
check-type-assertions: true check-type-assertions: true
@ -114,10 +160,12 @@ issues:
formatters: formatters:
enable: enable:
- gci
- gofmt
- gofumpt
- goimports - goimports
# TODO: Disabled, because they are failing at the moment, we should fix them and enable (step by step)
# - gci
# - gofmt
# - gofumpt
# - golines
settings: settings:
gci: gci:
sections: sections:
@ -126,8 +174,11 @@ formatters:
- localmodule - localmodule
custom-order: true custom-order: true
gofmt: gofmt:
simplify: true
rewrite-rules: rewrite-rules:
- pattern: "interface{}" - pattern: "interface{}"
replacement: "any" replacement: "any"
- pattern: "a[b:len(a)]" - pattern: "a[b:len(a)]"
replacement: "a[b:]" replacement: "a[b:]"
golines:
max-len: 120