Skip to content

Commit

Permalink
updates to golangci config
Browse files Browse the repository at this point in the history
  • Loading branch information
oliveromahony committed Sep 24, 2024
1 parent 22d3553 commit 8e7d736
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 24 deletions.
25 changes: 2 additions & 23 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ linters:
enable:
- bodyclose
- cyclop
- copyloopvar
- contextcheck
- dupl
- errorlint
- exhaustive
- exportloopref
- forcetypeassert
- gocheckcompilerdirectives
- gocognit
Expand All @@ -28,7 +28,6 @@ linters:
- godox
- gofumpt
- goheader
- gomnd
- gomoddirectives
- gosec
- grouper
Expand All @@ -40,6 +39,7 @@ linters:
- makezero
- mirror
- misspell
- mnd
- musttag
- nakedret
- nestif
Expand Down Expand Up @@ -201,27 +201,6 @@ linters-settings:
This source code is licensed under the Apache License, Version 2.0 license found in the
LICENSE file in the root directory of this source tree.
gomnd:
# List of enabled checks, see https://github.com/tommy-muehle/go-mnd/#checks for description.
# Default: ["argument", "case", "condition", "operation", "return", "assign"]
checks:
- argument
- case
- condition
- operation
- return
- assign
# List of numbers to exclude from analysis. The numbers should be written as string.
# Values always ignored: "1", "1.0", "0" and "0.0". Default: []
ignored-numbers: []
# List of file patterns to exclude from analysis. Values always ignored: `.+_test.go`. Default: []
ignored-files: []
# List of function patterns to exclude from analysis.
# Following functions are always ignored: `time.Date`,
# `strconv.FormatInt`, `strconv.FormatUint`, `strconv.FormatFloat`,
# `strconv.ParseInt`, `strconv.ParseUint`, `strconv.ParseFloat`.
# Default: []
ignored-functions: []
gomoddirectives:
# Allow local `replace` directives. Default: false
replace-local: false
Expand Down
1 change: 0 additions & 1 deletion internal/watcher/instance/nginx_process_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,6 @@ func isFlag(vals []string) bool {
return len(vals) == 1 && vals[0] != ""
}

// nolint: gomnd
func isKeyValueFlag(vals []string) bool {
return len(vals) == 2

Check failure on line 322 in internal/watcher/instance/nginx_process_parser.go

View workflow job for this annotation

GitHub Actions / Lint

Magic number: 2, in <return> detected (mnd)
}
Expand Down

0 comments on commit 8e7d736

Please sign in to comment.