129 lines
2.8 KiB
YAML
129 lines
2.8 KiB
YAML
---
|
|
version: "2"
|
|
linters:
|
|
default: all
|
|
disable:
|
|
- containedctx
|
|
- depguard
|
|
- exhaustruct
|
|
- funlen
|
|
- gochecknoglobals
|
|
- gocritic
|
|
- godot
|
|
- iface
|
|
- interfacebloat
|
|
- ireturn
|
|
- mnd
|
|
- paralleltest
|
|
- tagalign
|
|
- tagliatelle
|
|
- testpackage
|
|
- noinlineerr
|
|
- embeddedstructfieldcheck
|
|
- wsl # deprecated
|
|
- gomodguard # deprecated
|
|
- unqueryvet # we love SELECT * when working with databases
|
|
settings:
|
|
cyclop:
|
|
max-complexity: 25
|
|
dupl:
|
|
threshold: 400
|
|
forbidigo:
|
|
forbid:
|
|
- pattern: ^(fmt\.Print(|f|ln)|print|println)$
|
|
- pattern: ^time\.Now\(\)($|\.F|\.A|\.B|\.L|\.UTC\(\)\.I|,|\))(# Calls of time\.Now() without \.UTC() is prohibited\.)?
|
|
funcorder:
|
|
constructor: true
|
|
struct-method: false
|
|
alphabetical: true
|
|
gocyclo:
|
|
min-complexity: 40
|
|
govet:
|
|
enable-all: true
|
|
lll:
|
|
line-length: 120
|
|
perfsprint:
|
|
concat-loop: false
|
|
revive:
|
|
enable-all-rules: true
|
|
rules:
|
|
# This linter creates more problems than gives profits. Probably should be configured?
|
|
- name: add-constant
|
|
disabled: true
|
|
# gocognit
|
|
- name: cognitive-complexity
|
|
disabled: true
|
|
- name: confusing-results
|
|
disabled: true
|
|
# gocyclo
|
|
- name: cyclomatic
|
|
disabled: true
|
|
- name: function-length
|
|
arguments: [200, 0]
|
|
- name: import-alias-naming
|
|
arguments:
|
|
- "^[a-z][a-zA-Z0-9]{0,}$"
|
|
- name: line-length-limit
|
|
disabled: true
|
|
- name: package-comments
|
|
disabled: true
|
|
- name: unused-receiver
|
|
disabled: true
|
|
- name: var-naming
|
|
arguments:
|
|
- ["ID"]
|
|
- ["VM"]
|
|
- - skipPackageNameChecks: true
|
|
- name: package-naming
|
|
disabled: true
|
|
wrapcheck:
|
|
ignore-sig-regexps:
|
|
- \.Write\(
|
|
- \.WriteString\(
|
|
- \.WriteJSON\(
|
|
- \.WriteHTML\(
|
|
- \.Redirect\(
|
|
- \.Error\(
|
|
wsl_v5:
|
|
allow-first-in-block: true
|
|
allow-whole-block: false
|
|
branch-max-lines: 2
|
|
exclusions:
|
|
generated: lax
|
|
presets:
|
|
- common-false-positives
|
|
- legacy
|
|
- std-error-handling
|
|
rules:
|
|
- linters:
|
|
- godox
|
|
text: TODO
|
|
- linters:
|
|
- gosec
|
|
text: G101
|
|
paths:
|
|
- billing
|
|
- cms
|
|
- monolit-apigateway
|
|
- third_party$
|
|
- builtin$
|
|
- examples$
|
|
issues:
|
|
max-issues-per-linter: 0
|
|
max-same-issues: 0
|
|
uniq-by-line: false
|
|
formatters:
|
|
enable:
|
|
- gofmt
|
|
- gofumpt
|
|
settings:
|
|
gofumpt:
|
|
module-path: go.dev.pztrn.name/rsser
|
|
extra-rules: true
|
|
exclusions:
|
|
generated: lax
|
|
paths:
|
|
- third_party$
|
|
- builtin$
|
|
- examples$
|