github.com/ethereum/go-ethereum@v1.16.1/.golangci.yml (about)

     1  # This file configures github.com/golangci/golangci-lint.
     2  version: '2'
     3  run:
     4    tests: true
     5  linters:
     6    default: none
     7    enable:
     8      - bidichk
     9      - copyloopvar
    10      - durationcheck
    11      - gocheckcompilerdirectives
    12      - govet
    13      - ineffassign
    14      - mirror
    15      - misspell
    16      - reassign
    17      - revive # only certain checks enabled
    18      - staticcheck
    19      - unconvert
    20      - unused
    21      - usetesting
    22      - whitespace
    23      ### linters we tried and will not be using:
    24      ###
    25      # - structcheck # lots of false positives
    26      # - errcheck #lot of false positives
    27      # - contextcheck
    28      # - errchkjson # lots of false positives
    29      # - errorlint # this check crashes
    30      # - exhaustive # silly check
    31      # - makezero # false positives
    32      # - nilerr # several intentional
    33    settings:
    34      staticcheck:
    35        checks:
    36          # disable Quickfixes
    37          - -QF1*
    38      revive:
    39        enable-all-rules: false
    40        # here we enable specific useful rules
    41        # see https://golangci-lint.run/usage/linters/#revive for supported rules
    42        rules:
    43          - name: receiver-naming
    44            severity: warning
    45            disabled: false
    46            exclude:
    47              - ''
    48    exclusions:
    49      generated: lax
    50      presets:
    51        - comments
    52        - common-false-positives
    53        - legacy
    54        - std-error-handling
    55      rules:
    56        - linters:
    57            - deadcode
    58            - staticcheck
    59          path: crypto/bn256/cloudflare/optate.go
    60        - linters:
    61            - revive
    62          path: crypto/bn256/
    63        - path: cmd/utils/flags.go
    64          text: "SA1019: cfg.TxLookupLimit is deprecated: use 'TransactionHistory' instead."
    65        - path: cmd/utils/flags.go
    66          text: "SA1019: ethconfig.Defaults.TxLookupLimit is deprecated: use 'TransactionHistory' instead."
    67        - path: internal/build/pgp.go
    68          text: 'SA1019: "golang.org/x/crypto/openpgp" is deprecated: this package is unmaintained except for security fixes.'
    69        - path: core/vm/contracts.go
    70          text: 'SA1019: "golang.org/x/crypto/ripemd160" is deprecated: RIPEMD-160 is a legacy hash and should not be used for new applications.'
    71        - path: (.+)\.go$
    72          text: 'SA1019: event.TypeMux is deprecated: use Feed'
    73        - path: (.+)\.go$
    74          text: 'SA1019: strings.Title is deprecated'
    75        - path: (.+)\.go$
    76          text: 'SA1019: strings.Title has been deprecated since Go 1.18 and an alternative has been available since Go 1.0: The rule Title uses for word boundaries does not handle Unicode punctuation properly. Use golang.org/x/text/cases instead.'
    77        - path: (.+)\.go$
    78          text: 'SA1029: should not use built-in type string as key for value'
    79      paths:
    80        - core/genesis_alloc.go
    81        - third_party$
    82        - builtin$
    83        - examples$
    84  formatters:
    85    enable:
    86      - goimports
    87    settings:
    88      gofmt:
    89        simplify: true
    90    exclusions:
    91      generated: lax
    92      paths:
    93        - core/genesis_alloc.go
    94        - third_party$
    95        - builtin$
    96        - examples$