From 87f85838f3e2ffbb16736faaf625f9c30fcfb474 Mon Sep 17 00:00:00 2001 From: Matthieu MOREL Date: Fri, 25 Apr 2025 08:17:18 +0200 Subject: [PATCH 1/3] chore: clean up golangci-lint configuration Signed-off-by: Matthieu MOREL --- .golangci.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 844fc2e55..a329f64bf 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -31,16 +31,12 @@ linters: formatter: require-f-funcs: true exclusions: - generated: lax presets: - comments - common-false-positives - legacy - std-error-handling - paths: - - third_party$ - - builtin$ - - examples$ + warn-unused: true issues: max-issues-per-linter: 0 max-same-issues: 0 @@ -52,9 +48,3 @@ formatters: goimports: local-prefixes: - github.com/prometheus/common - exclusions: - generated: lax - paths: - - third_party$ - - builtin$ - - examples$ From ad84bbee6576c9cfb7e5041214bf792e3b0ed7a8 Mon Sep 17 00:00:00 2001 From: Matthieu MOREL Date: Thu, 18 Sep 2025 15:59:51 +0200 Subject: [PATCH 2/3] Update .golangci.yml to remove unused linters Signed-off-by: Matthieu MOREL --- .golangci.yml | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index b046652e4..cf300ad47 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -39,10 +39,6 @@ linters: - errcheck # Taken from the default exclusions in v1. text: Error return value of .((os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*print(f|ln)?|os\.(Un)?Setenv). is not checked - - linters: - - govet - # We use many Seek methods that do not follow the usual pattern. - text: "stdmethods: method Seek.* should have signature Seek" - linters: - revive # We have stopped at some point to write doc comments on exported symbols. @@ -51,15 +47,6 @@ linters: - linters: - gocritic text: "appendAssign" - - linters: - - errcheck - path: _test.go - - linters: - - errorlint - path: "tsdb/head_wal.go" - - linters: - - godot - source: "^// ===" warn-unused: true settings: depguard: From 267c2ea6d10303eaf53a64b8917a9e501dfd3a32 Mon Sep 17 00:00:00 2001 From: Matthieu MOREL Date: Thu, 18 Sep 2025 16:02:18 +0200 Subject: [PATCH 3/3] Update .golangci.yml to remove excluded paths Removed specific paths from the golangci-lint configuration. Signed-off-by: Matthieu MOREL --- .golangci.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index cf300ad47..e4332da12 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -30,10 +30,6 @@ linters: - common-false-positives - legacy - std-error-handling - paths: - - third_party$ - - builtin$ - - examples$ rules: - linters: - errcheck