6
0
mirror of https://github.com/grdl/git-get.git synced 2026-02-04 15:04:44 +00:00

Simplify linters config, fix cyclop issues in main.go

This commit is contained in:
Grzegorz Dlugoszewski
2025-08-24 14:29:56 +02:00
parent ccdca12f96
commit b31de718d4
3 changed files with 84 additions and 183 deletions

View File

@@ -1,115 +1,20 @@
version: 2
version: "2"
run:
timeout: 5m
go: '1.24'
timeout: 1m
linters-settings:
errcheck:
check-type-assertions: true
check-blank: true
govet:
enable-all: true
disable:
- shadow
gocyclo:
min-complexity: 15
dupl:
threshold: 100
goconst:
min-len: 3
min-occurrences: 3
lll:
line-length: 120
unparam:
check-exported: false
nakedret:
max-func-lines: 30
prealloc:
simple: true
range-loops: true
for-loops: false
gocritic:
enabled-tags:
- diagnostic
- experimental
- opinionated
- performance
- style
funlen:
lines: 100
statements: 50
godox:
keywords:
- NOTE
- OPTIMIZE
- HACK
dogsled:
max-blank-identifiers: 2
whitespace:
multi-if: false
multi-func: false
formatters:
enable:
- gci
- gofmt
- goimports
linters:
disable-all: true
enable:
- bodyclose
- dogsled
- dupl
- errcheck
- funlen
- gochecknoinits
- goconst
- gocritic
- gocyclo
- godox
- goprintffuncname
- gosec
- govet
- ineffassign
- lll
- misspell
- nakedret
- noctx
- nolintlint
- prealloc
- revive
- staticcheck
- unconvert
- unparam
- unused
- whitespace
default: all
issues:
exclude-rules:
- path: _test\.go
linters:
- funlen
- goconst
- lll
exclusions:
rules:
- path: _test.go
linters:
- dupl # We don't mind duplicated code in tests. It helps with clarity
- path: pkg/git/test/
linters:
- goconst
exclude-use-default: false
max-issues-per-linter: 0
max-same-issues: 0
output:
format: colored-line-number
print-issued-lines: true
print-linter-name: true