github.com/nozzle/golangci-lint@v1.49.0-nz3/.golangci.yml (about)

     1  linters-settings:
     2    depguard:
     3      list-type: denylist
     4      packages:
     5        # logging is allowed only by logutils.Log, logrus
     6        # is allowed to use only in logutils package
     7        - github.com/sirupsen/logrus
     8      packages-with-error-message:
     9        - github.com/sirupsen/logrus: "logging is allowed only by logutils.Log"
    10    dupl:
    11      threshold: 100
    12    funlen:
    13      lines: 100
    14      statements: 50
    15    goconst:
    16      min-len: 2
    17      min-occurrences: 3
    18    gocritic:
    19      enabled-tags:
    20        - diagnostic
    21        - experimental
    22        - opinionated
    23        - performance
    24        - style
    25      disabled-checks:
    26        - dupImport # https://github.com/go-critic/go-critic/issues/845
    27        - ifElseChain
    28        - octalLiteral
    29        - whyNoLint
    30    gocyclo:
    31      min-complexity: 15
    32    goimports:
    33      local-prefixes: github.com/golangci/golangci-lint
    34    gomnd:
    35      # don't include the "operation" and "assign"
    36      checks:
    37        - argument
    38        - case
    39        - condition
    40        - return
    41      ignored-numbers:
    42        - '0'
    43        - '1'
    44        - '2'
    45        - '3'
    46      ignored-functions:
    47        - strings.SplitN
    48  
    49    govet:
    50      check-shadowing: true
    51      settings:
    52        printf:
    53          funcs:
    54            - (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof
    55            - (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf
    56            - (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf
    57            - (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
    58    lll:
    59      line-length: 140
    60    misspell:
    61      locale: US
    62    nolintlint:
    63      allow-unused: false # report any unused nolint directives
    64      require-explanation: false # don't require an explanation for nolint directives
    65      require-specific: false # don't require nolint directives to be specific about which linter is being skipped
    66  
    67  linters:
    68    disable-all: true
    69    enable:
    70      - bodyclose
    71      - depguard
    72      - dogsled
    73      - dupl
    74      - errcheck
    75      - exportloopref
    76      - funlen
    77      - gochecknoinits
    78      - goconst
    79      - gocritic
    80      - gocyclo
    81      - gofmt
    82      - goimports
    83      - gomnd
    84      - goprintffuncname
    85      - gosec
    86      - gosimple
    87      - govet
    88      - ineffassign
    89      - lll
    90      - misspell
    91      - nakedret
    92      - noctx
    93      - nolintlint
    94      - staticcheck
    95      - stylecheck
    96      - typecheck
    97      - unconvert
    98      - unparam
    99      - unused
   100      - whitespace
   101  
   102    # don't enable:
   103    # - asciicheck
   104    # - scopelint
   105    # - gochecknoglobals
   106    # - gocognit
   107    # - godot
   108    # - godox
   109    # - goerr113
   110    # - interfacer
   111    # - maligned
   112    # - nestif
   113    # - prealloc
   114    # - testpackage
   115    # - revive
   116    # - wsl
   117  
   118  issues:
   119    # Excluding configuration per-path, per-linter, per-text and per-source
   120    exclude-rules:
   121      - path: _test\.go
   122        linters:
   123          - gomnd
   124  
   125      - path: pkg/golinters/errcheck.go
   126        text: "SA1019: errCfg.Exclude is deprecated: use ExcludeFunctions instead"
   127      - path: pkg/commands/run.go
   128        text: "SA1019: lsc.Errcheck.Exclude is deprecated: use ExcludeFunctions instead"
   129      - path: pkg/commands/run.go
   130        text: "SA1019: e.cfg.Run.Deadline is deprecated: Deadline exists for historical compatibility and should not be used."
   131  
   132      - path: pkg/golinters/gofumpt.go
   133        text: "SA1019: settings.LangVersion is deprecated: use the global `run.go` instead."
   134      - path: pkg/golinters/staticcheck_common.go
   135        text: "SA1019: settings.GoVersion is deprecated: use the global `run.go` instead."
   136      - path: pkg/lint/lintersdb/manager.go
   137        text: "SA1019: (.+).(GoVersion|LangVersion) is deprecated: use the global `run.go` instead."
   138  
   139  run:
   140    timeout: 5m
   141    skip-dirs:
   142      - test/testdata_etc # test files
   143      - internal/cache # extracted from Go code
   144      - internal/renameio # extracted from Go code
   145      - internal/robustio # extracted from Go code