1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-11-17 18:06:03 -05:00
OpenDiablo2/.golangci.yml
Panagiotis Georgiadis e9031d97bd
Disable fieldalignment
2021-03-25 00:51:10 +01:00

101 lines
1.8 KiB
YAML

---
linters-settings:
dupl:
threshold: 100
funlen:
lines: 100
statements: 50
goconst:
min-len: 2
min-occurrences: 2
gocritic:
enabled-tags:
- diagnostic
- experimental
- opinionated
- performance
- style
disabled-checks:
gocyclo:
min-complexity: 15
gofmt:
simplify: true
goimports:
local-prefixes: github.com/OpenDiablo2/OpenDiablo2
golint:
min-confidence: 0.8
govet:
enable-all: true
check-shadowing: true
disable:
# While struct sizes could be smaller if fields aligned properly, that also leads
# to possibly non-intuitive layout of struct fields (harder to read). Disable
# `fieldalignment` check here until we evaluate if it is worthwhile.
- fieldalignment
lll:
line-length: 140
misspell:
locale: US
linters:
disable-all: true
enable:
- bodyclose
- deadcode
- depguard
- dogsled
- dupl
- errcheck
- funlen
- gochecknoglobals
- gochecknoinits
- gocognit
- goconst
- gocritic
- gocyclo
- godox
- gofmt
- goimports
- golint
- gomnd
- goprintffuncname
- gosec
- gosimple
- govet
- ineffassign
- lll
- misspell
- nakedret
- prealloc
- rowserrcheck
- scopelint
- staticcheck
- structcheck
- stylecheck
- typecheck
- unconvert
- unparam
- unused
- varcheck
- whitespace
- wsl
run:
timeout: 5m
tests: true
skip-dirs:
- .github
- build
- web
issues:
exclude-rules:
- linters:
- funlen
# Disable 'funlen' linter for test functions.
# It's common for table-driven tests to be more than 60 characters long
source: "^func Test"
max-issues-per-linter: 0
max-same-issues: 0
exclude-use-default: false