From 99f29e59a12deb2e55a49bfc9a7e762fad6c0741 Mon Sep 17 00:00:00 2001 From: silverwind Date: Sat, 18 May 2024 10:53:28 +0200 Subject: [PATCH] Clean up revive linter config, tweak golangci output (#30980) The `errorCode` and `warningCode` options were removed at some point, they are not recognized by golangci-lint any more at least and they do not match their published json schema. `confidence` and `ignore-generated-header` are at the default value so does not need to be configured. https://golangci-lint.run/usage/linters/#revive (cherry picked from commit 028992429a2e14de39c9bb028637948e446d23ad) --- .golangci.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 6d835909f..c55a08bba 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -33,6 +33,8 @@ run: output: sort-results: true + sort-order: [file] + show-stats: true linters-settings: stylecheck: @@ -44,11 +46,7 @@ linters-settings: - ifElseChain - singleCaseSwitch # Every time this occurred in the code, there was no other way. revive: - ignore-generated-header: false - severity: warning - confidence: 0.8 - errorCode: 1 - warningCode: 1 + severity: error rules: - name: atomic - name: bare-return