From 8e7d73642c74012baedf686b54adc527f7387d8e Mon Sep 17 00:00:00 2001 From: Oliver O'Mahony Date: Tue, 24 Sep 2024 18:11:12 +0100 Subject: [PATCH] updates to golangci config --- .golangci.yml | 25 ++----------------- .../watcher/instance/nginx_process_parser.go | 1 - 2 files changed, 2 insertions(+), 24 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 0d8ddf4306..d830af46b8 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -14,11 +14,11 @@ linters: enable: - bodyclose - cyclop + - copyloopvar - contextcheck - dupl - errorlint - exhaustive - - exportloopref - forcetypeassert - gocheckcompilerdirectives - gocognit @@ -28,7 +28,6 @@ linters: - godox - gofumpt - goheader - - gomnd - gomoddirectives - gosec - grouper @@ -40,6 +39,7 @@ linters: - makezero - mirror - misspell + - mnd - musttag - nakedret - nestif @@ -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 diff --git a/internal/watcher/instance/nginx_process_parser.go b/internal/watcher/instance/nginx_process_parser.go index f4dd768c99..87dc08c72a 100644 --- a/internal/watcher/instance/nginx_process_parser.go +++ b/internal/watcher/instance/nginx_process_parser.go @@ -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 }