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