diff --git a/.errcheck_excludes.txt b/.errcheck_excludes.txt deleted file mode 100644 index 0c956b4575..0000000000 --- a/.errcheck_excludes.txt +++ /dev/null @@ -1,3 +0,0 @@ -(github.com/go-kit/log.Logger).Log -fmt.Fprintln -fmt.Fprint diff --git a/.golangci.yml b/.golangci.yml index 14a5d41203..ce3b218244 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -4,25 +4,17 @@ # options for analysis running run: # timeout for analysis, e.g. 30s, 5m, default is 1m - deadline: 5m + timeout: 5m # exit code when at least one issue was found, default is 1 issues-exit-code: 1 - # which dirs to skip: they won't be analyzed; - # can use regexp here: generated.*, regexp is applied on full path; - # default value is empty list, but next dirs are always skipped independently - # from this option's value: - # vendor$, third_party$, testdata$, examples$, Godeps$, builtin$ - skip-dirs: - - vendor - - internal/cortex - - # output configuration options output: - # colored-line-number|line-number|json|tab|checkstyle, default is "colored-line-number" - format: colored-line-number + # The formats used to render issues. + formats: + - format: colored-line-number + path: stdout # print lines of code with issue, default is true print-issued-lines: true @@ -51,7 +43,11 @@ linters: linters-settings: errcheck: - exclude: ./.errcheck_excludes.txt + # List of functions to exclude from checking, where each entry is a single function to exclude. + exclude-functions: + - (github.com/go-kit/log.Logger).Log + - fmt.Fprintln + - fmt.Fprint misspell: locale: US goconst: @@ -80,3 +76,7 @@ issues: - linters: - unused text: "ruleAndAssert" + # Which dirs to exclude: issues from them won't be reported. + exclude-dirs: + - vendor + - internal/cortex