Files
gh-action-readme/.golangci.yml
Ismo Vuorinen b80ecfce92 chore: even more linting, test fixes (#24)
* chore(lint): funcorder

* chore(lint): yamlfmt, ignored broken test yaml files

* chore(tests): tests do not output garbage, add coverage

* chore(lint): fix editorconfig violations

* chore(lint): move from eclint to editorconfig-checker

* chore(lint): add pre-commit, run and fix

* chore(ci): we use renovate to manage updates
2025-08-06 23:44:32 +03:00

91 lines
1.4 KiB
YAML

---
# yaml-language-server: $schema=https://golangci-lint.run/jsonschema/golangci.jsonschema.json
version: "2"
run:
timeout: 5m
go: "1.23"
linters:
default: standard
enable:
# Additional linters beyond standard
- asciicheck
- bidichk
- bodyclose
- canonicalheader
- contextcheck
- dupl
- errname
- exhaustive
- forcetypeassert
- funcorder
- goconst
- gocritic
- gocyclo
- godot
- godox
- goheader
- gosec
- iface
- importas
- lll
- maintidx
- misspell
- nilerr
- nlreturn
- nolintlint
- perfsprint
- prealloc
- predeclared
- reassign
- revive
- tagalign
- testableexamples
- thelper
- usestdlibvars
- usetesting
disable:
# Disable noisy linters
- funlen
- wsl
- wrapcheck
settings:
lll:
line-length: 120
misspell:
locale: US
gocyclo:
min-complexity: 10
goconst:
min-len: 2
min-occurrences: 3
formatters:
enable:
- gofmt
- goimports
- golines
settings:
golines:
max-len: 120
gofmt:
simplify: true
rewrite-rules:
- pattern: 'interface{}'
replacement: 'any'
- pattern: 'a[b:len(a)]'
replacement: 'a[b:]'
goimports:
local-prefixes:
- github.com/ivuorinen/gh-action-readme
issues:
max-issues-per-linter: 50
max-same-issues: 3
fix: true