github.com/aiyaya188/klaytn@v0.0.0-20220629133911-2c66fd5546f4/.golangci.yml (about)

     1  # This file configures github.com/golangci/golangci-lint.
     2  
     3  run:
     4    timeout: 20m
     5    tests: true
     6    # default is true. Enables skipping of directories:
     7    #   vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
     8    skip-dirs-use-default: true
     9    skip-files:
    10      - core/genesis_alloc.go
    11  
    12  linters:
    13    disable-all: true
    14    enable:
    15      - deadcode
    16      - goconst
    17      - goimports
    18      - gosimple
    19      - govet
    20      - ineffassign
    21      - misspell
    22      - unconvert
    23      - varcheck
    24      - typecheck
    25      - unused
    26      - staticcheck
    27      - bidichk
    28      - durationcheck
    29      - exportloopref
    30      - gosec
    31  
    32      #- structcheck # lots of false positives
    33      #- errcheck #lot of false positives
    34     # - contextcheck
    35     # - errchkjson # lots of false positives
    36     # - errorlint # this check crashes
    37     # - exhaustive # silly check
    38     # - makezero # false positives
    39     # - nilerr # several intentional
    40  
    41  linters-settings:
    42    gofmt:
    43      simplify: true
    44    goconst:
    45      min-len: 3 # minimum length of string constant
    46      min-occurrences: 6 # minimum number of occurrences
    47    gosec:
    48      excludes:
    49       - G404 # Use of weak random number generator - lots of FP
    50       - G107 # Potential http request -- those are intentional
    51       - G306 # G306: Expect WriteFile permissions to be 0600 or less
    52  
    53  issues:
    54    exclude-rules:
    55      - path: crypto/bn256/cloudflare/optate.go
    56        linters:
    57          - deadcode
    58          - staticcheck
    59      - path: internal/build/pgp.go
    60        text: 'SA1019: package golang.org/x/crypto/openpgp is deprecated'
    61      - path: core/vm/contracts.go
    62        text: 'SA1019: package golang.org/x/crypto/ripemd160 is deprecated'
    63      - path: accounts/usbwallet/trezor.go
    64        text: 'SA1019: package github.com/golang/protobuf/proto is deprecated'
    65      - path: accounts/usbwallet/trezor/
    66        text: 'SA1019: package github.com/golang/protobuf/proto is deprecated'
    67    exclude:
    68      - 'SA1019: event.TypeMux is deprecated: use Feed'
    69      - 'SA1019: strings.Title is deprecated'
    70      - 'SA1029: should not use built-in type string as key for value'
    71      - 'G306: Expect WriteFile permissions to be 0600 or less'