...

Text file src/github.com/prometheus/client_golang/.golangci.yml

Documentation: github.com/prometheus/client_golang

     1---
     2run:
     3  deadline: 5m
     4  skip-files:
     5    # Skip autogenerated files.
     6    - ^.*\.(pb|y)\.go$
     7
     8output:
     9  sort-results: true
    10
    11linters:
    12  enable:
    13    - depguard
    14    - durationcheck
    15    - errorlint
    16    - exportloopref
    17    - gofmt
    18    - gofumpt
    19    - goimports
    20    - gosimple
    21    - ineffassign
    22    - misspell
    23    - nolintlint
    24    - predeclared
    25    - revive
    26    - staticcheck
    27    - unconvert
    28    - unused
    29    - wastedassign
    30
    31issues:
    32  max-same-issues: 0
    33  exclude-rules:
    34    - path: _test.go
    35      linters:
    36        - errcheck
    37        - govet
    38        - structcheck
    39
    40linters-settings:
    41  depguard:
    42    rules:
    43      main:
    44        deny:
    45        #- pkg: "sync/atomic"
    46        #  desc: "Use go.uber.org/atomic instead of sync/atomic"
    47        - pkg: "github.com/stretchr/testify/assert"
    48          desc: "Use github.com/stretchr/testify/require instead of github.com/stretchr/testify/assert"
    49        - pkg: "github.com/go-kit/kit/log"
    50          desc: "Use github.com/go-kit/log instead of github.com/go-kit/kit/log"
    51        - pkg: "io/ioutil"
    52          desc: "Use corresponding 'os' or 'io' functions instead."
    53        #- pkg: "regexp"
    54        #  desc: "Use github.com/grafana/regexp instead of regexp"
    55  errcheck:
    56    exclude-functions:
    57      # The following 2 methods always return nil as the error
    58      - (*github.com/cespare/xxhash/v2.Digest).Write
    59      - (*github.com/cespare/xxhash/v2.Digest).WriteString
    60      - (*bufio.Writer).WriteRune
    61  goimports:
    62    local-prefixes: github.com/prometheus/client_golang
    63  gofumpt:
    64    extra-rules: true
    65  revive:
    66    rules:
    67      # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unused-parameter
    68      - name: unused-parameter
    69        severity: warning
    70        disabled: true

View as plain text