.golangci.yaml raw

   1  version: "2"
   2  linters:
   3    default: none
   4    enable:
   5      - dogsled
   6      - dupl
   7      - errcheck
   8      - funlen
   9      - gochecknoinits
  10      - goconst
  11      - gocritic
  12      - gocyclo
  13      - goprintffuncname
  14      - gosec
  15      - govet
  16      - ineffassign
  17      - lll
  18      - misspell
  19      - mnd
  20      - nakedret
  21      - noctx
  22      - nolintlint
  23      - revive
  24      - staticcheck
  25      - unconvert
  26      - unparam
  27      - unused
  28      - whitespace
  29    settings:
  30      dupl:
  31        threshold: 100
  32      funlen:
  33        lines: -1
  34        statements: 50
  35      goconst:
  36        min-len: 2
  37        min-occurrences: 3
  38      gocritic:
  39        disabled-checks:
  40          - dupImport
  41          - ifElseChain
  42          - octalLiteral
  43          - whyNoLint
  44        enabled-tags:
  45          - diagnostic
  46          - experimental
  47          - opinionated
  48          - performance
  49          - style
  50      gocyclo:
  51        min-complexity: 15
  52      govet:
  53        disable:
  54          - fieldalignment
  55        enable-all: true
  56        settings:
  57          printf:
  58            funcs:
  59              - (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof
  60              - (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf
  61              - (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf
  62              - (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
  63      lll:
  64        line-length: 140
  65      misspell:
  66        locale: US
  67      mnd:
  68        checks:
  69          - argument
  70          - case
  71          - condition
  72          - return
  73        ignored-numbers:
  74          - "0"
  75          - "1"
  76          - "2"
  77          - "3"
  78        ignored-functions:
  79          - strings.SplitN
  80      nolintlint:
  81        require-explanation: false
  82        require-specific: false
  83        allow-unused: false
  84      revive:
  85        rules:
  86          - name: unexported-return
  87            disabled: true
  88    exclusions:
  89      generated: lax
  90      presets:
  91        - comments
  92        - common-false-positives
  93        - legacy
  94        - std-error-handling
  95      rules:
  96        - linters:
  97            - dogsled
  98            - dupl
  99            - errcheck
 100            - goconst
 101            - gocyclo
 102            - gosec
 103            - lll
 104          path: _test\.go
 105        - path: (.+)\.go$
 106          text: abcdef
 107      paths:
 108        - third_party$
 109        - builtin$
 110        - examples$
 111  formatters:
 112    enable:
 113      - gofmt
 114      - goimports
 115    settings:
 116      goimports:
 117        local-prefixes:
 118          - github.com/golangci/golangci-lint
 119    exclusions:
 120      generated: lax
 121      paths:
 122        - third_party$
 123        - builtin$
 124        - examples$
 125