Linting improvements.
This commit is contained in:
parent
9410522dd5
commit
f1418a7a31
@ -3,17 +3,10 @@ run:
|
||||
linters:
|
||||
enable-all: true
|
||||
disable:
|
||||
# Because globals might exist, but according to our codestyle they
|
||||
# should be lowercased and considered as unexported.
|
||||
- gochecknoglobals
|
||||
# While it might be useful it'll create more problems that will solve.
|
||||
- gocritic
|
||||
# Complains about main() lengths, which isn't an issue.
|
||||
- funlen
|
||||
# Magic numbers might be everywhere. Disabled for now.
|
||||
- gomnd
|
||||
# ToDos everywhere
|
||||
- godox
|
||||
# Why? WHY? WHY _test???
|
||||
- testpackage
|
||||
linters-settings:
|
||||
@ -23,3 +16,12 @@ linters-settings:
|
||||
min-complexity: 40
|
||||
gocognit:
|
||||
min-complexity: 40
|
||||
funlen:
|
||||
lines: 200
|
||||
|
||||
issues:
|
||||
exclude-rules:
|
||||
# There will be some ToDos.
|
||||
- linters:
|
||||
- godox
|
||||
text: "TODO"
|
||||
|
@ -1,5 +1,6 @@
|
||||
package common
|
||||
|
||||
// nolint:gochecknoglobals
|
||||
var (
|
||||
Branch string
|
||||
Build string
|
||||
|
@ -13,6 +13,7 @@ import (
|
||||
"go.dev.pztrn.name/metricator/internal/models"
|
||||
)
|
||||
|
||||
// nolint:gochecknoglobals
|
||||
var (
|
||||
errInvalidAPIVersion = errors.New("invalid API version")
|
||||
errInvalidApplication = errors.New("invalid application")
|
||||
|
Loading…
Reference in New Issue
Block a user