mirror of
https://github.com/qdm12/ddns-updater.git
synced 2026-03-31 06:24:00 -04:00
Maintenance: upgrade linting setup
- Update Golangci-lint to v1.40.1 - Add more linters - Remove rules from .golangci.yml in favor of inline nolint comments - Fix linting errors
This commit is contained in:
@@ -6,18 +6,6 @@ linters-settings:
|
||||
|
||||
issues:
|
||||
exclude-rules:
|
||||
- path: cmd/
|
||||
text: buildInfo is a global variable
|
||||
linters:
|
||||
- gochecknoglobals
|
||||
- path: cmd/
|
||||
text: commit is a global variable
|
||||
linters:
|
||||
- gochecknoglobals
|
||||
- path: cmd/
|
||||
text: buildDate is a global variable
|
||||
linters:
|
||||
- gochecknoglobals
|
||||
- path: cmd/updater/main.go
|
||||
text: "mnd: Magic number: 4, in <argument> detected"
|
||||
linters:
|
||||
@@ -26,17 +14,6 @@ issues:
|
||||
text: "mnd: Magic number: 2, in <argument> detected"
|
||||
linters:
|
||||
- gomnd
|
||||
- path: internal/regex/regex.go
|
||||
text: "regexpMust: for const patterns like "
|
||||
linters:
|
||||
- gocritic
|
||||
- path: internal/settings/
|
||||
linters:
|
||||
- maligned
|
||||
- dupl
|
||||
- path: pkg/publicip/.*_test.go
|
||||
linters:
|
||||
- dupl
|
||||
|
||||
linters:
|
||||
disable-all: true
|
||||
@@ -59,32 +36,36 @@ linters:
|
||||
- godot
|
||||
- goheader
|
||||
- goimports
|
||||
- golint
|
||||
- gomnd
|
||||
- goprintffuncname
|
||||
- gosec
|
||||
# - goerr113 # TODO
|
||||
- gosimple
|
||||
- govet
|
||||
- importas
|
||||
- ineffassign
|
||||
- interfacer
|
||||
- lll
|
||||
- maligned
|
||||
- misspell
|
||||
- nakedret
|
||||
- nestif
|
||||
- nilerr
|
||||
- noctx
|
||||
- nolintlint
|
||||
- prealloc
|
||||
- predeclared
|
||||
- rowserrcheck
|
||||
- scopelint
|
||||
- exportloopref
|
||||
- sqlclosecheck
|
||||
- staticcheck
|
||||
- structcheck
|
||||
- thelper
|
||||
- tparallel
|
||||
- typecheck
|
||||
- unconvert
|
||||
- unparam
|
||||
- unused
|
||||
- varcheck
|
||||
- wastedassign
|
||||
- whitespace
|
||||
|
||||
run:
|
||||
|
||||
Reference in New Issue
Block a user