github.com/ledgerwatch/erigon-lib@v1.0.0/.golangci.yml (about)

     1  run:
     2    deadline: 10m
     3    build-tags:
     4      - nosqlite
     5      - noboltdb
     6  
     7  linters:
     8    presets:
     9      - bugs
    10      - error
    11      - unused
    12      - performance
    13    disable:
    14      - gosec
    15      - exhaustive
    16      - musttag
    17      - contextcheck
    18      - wrapcheck
    19      - goerr113
    20      - unparam
    21      - makezero
    22    enable:
    23      - unconvert
    24      - predeclared
    25      - wastedassign
    26      - thelper
    27      - gofmt
    28      - gocritic
    29  #    - revive
    30  #    - forcetypeassert
    31  #    - stylecheck
    32  
    33  linters-settings:
    34    gocritic:
    35      # Which checks should be enabled; can't be combined with 'disabled-checks';
    36      # See https://go-critic.github.io/overview#checks-overview
    37      # To check which checks are enabled run `GL_DEBUG=gocritic golangci-lint run`
    38      # By default list of stable checks is used.
    39      enabled-checks:
    40        - ruleguard
    41        - truncateCmp
    42      #      - defaultCaseOrder
    43  
    44      # Which checks should be disabled; can't be combined with 'enabled-checks'; default is empty
    45      disabled-checks:
    46        - regexpMust
    47        #      - hugeParam
    48        - rangeValCopy
    49        - exitAfterDefer
    50        - elseif
    51        - dupBranchBody
    52        - assignOp
    53        - singleCaseSwitch
    54        - unlambda
    55        - captLocal
    56        - commentFormatting
    57        - ifElseChain
    58        - appendAssign
    59  
    60      # Enable multiple checks by tags, run `GL_DEBUG=gocritic golangci-lint run` to see all tags and checks.
    61      # Empty list by default. See https://github.com/go-critic/go-critic#usage -> section "Tags".
    62      enabled-tags:
    63        - performance
    64        - diagnostic
    65      #      - style
    66      #      - experimental
    67      #      - opinionated
    68      disabled-tags:
    69        - experimental
    70      ruleguard:
    71        rules: "rules.go"
    72      settings:
    73        hugeParam:
    74          # size in bytes that makes the warning trigger (default 80)
    75          sizeThreshold: 1000
    76        rangeExprCopy:
    77          # size in bytes that makes the warning trigger (default 512)
    78          sizeThreshold: 512
    79          # whether to check test functions (default true)
    80          skipTestFuncs: true
    81        truncateCmp:
    82          # whether to skip int/uint/uintptr types (default true)
    83          skipArchDependent: true
    84        underef:
    85          # whether to skip (*x).method() calls where x is a pointer receiver (default true)
    86          skipRecvDeref: true
    87  
    88    govet:
    89      disable:
    90        - deepequalerrors
    91        - shadow
    92        - unsafeptr
    93    goconst:
    94      min-len: 2
    95      min-occurrences: 2
    96    gofmt:
    97      auto-fix: false
    98  
    99  issues:
   100    exclude-rules:
   101      - linters:
   102          - golint
   103        text: "should be"
   104      - linters:
   105          - errcheck
   106        text: "not checked"
   107      - linters:
   108          - staticcheck
   109        text: "SA(1019|1029|5011)"
   110      # Exclude some linters from running on tests files.
   111      - path: test\.go
   112        linters:
   113          - gosec
   114          - unused
   115          - deadcode
   116          - gocritic
   117      - path: hack\.go
   118        linters:
   119          - gosec
   120          - unused
   121          - deadcode
   122          - gocritic
   123      - path: cmd/devp2p
   124        linters:
   125          - gosec
   126          - unused
   127          - deadcode
   128          - gocritic
   129      - path: metrics/sample\.go
   130        linters:
   131          - gosec
   132          - gocritic
   133      - path: p2p/simulations
   134        linters:
   135          - gosec
   136          - gocritic