github.com/lbryio/lbcd@v0.22.119/.golangci.yml (about) 1 linters-settings: 2 depguard: 3 list-type: blacklist 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 gci: 16 local-prefixes: github.com/golangci/golangci-lint 17 goconst: 18 min-len: 2 19 min-occurrences: 2 20 gocritic: 21 enabled-tags: 22 - diagnostic 23 - experimental 24 - opinionated 25 - performance 26 - style 27 disabled-checks: 28 - dupImport # https://github.com/go-critic/go-critic/issues/845 29 - ifElseChain 30 - octalLiteral 31 - whyNoLint 32 - wrapperFunc 33 gocyclo: 34 min-complexity: 15 35 goimports: 36 local-prefixes: github.com/golangci/golangci-lint 37 gomnd: 38 settings: 39 mnd: 40 # don't include the "operation" and "assign" 41 checks: 42 - argument 43 - case 44 - condition 45 - return 46 govet: 47 check-shadowing: true 48 settings: 49 printf: 50 funcs: 51 - (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof 52 - (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf 53 - (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf 54 - (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf 55 lll: 56 line-length: 140 57 maligned: 58 suggest-new: true 59 misspell: 60 locale: US 61 nolintlint: 62 allow-leading-space: true # don't require machine-readable nolint directives (i.e. with no leading space) 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 - asciicheck 71 - bodyclose 72 # - deadcode 73 - depguard 74 # - dogsled 75 # - dupl 76 # - errcheck 77 # - exhaustive 78 - exportloopref 79 # - funlen 80 # - gochecknoglobals 81 # - gochecknoinits 82 # - gocognit 83 # - goconst 84 # - gocritic 85 # - gocyclo 86 # - godot 87 # - godox 88 # - goerr113 89 - gofmt 90 - goimports 91 # - gomnd 92 - goprintffuncname 93 # - gosec 94 # - gosimple 95 # - govet 96 # - ineffassign 97 # - interfacer 98 # - lll 99 # - maligned 100 # - misspell 101 - nakedret 102 # - nestif 103 # - noctx 104 # - nolintlint 105 # - prealloc 106 - rowserrcheck 107 # - revive 108 # - scopelint 109 # - staticcheck 110 # - structcheck 111 # - stylecheck 112 # - testpackage 113 # - typecheck 114 - unconvert 115 # - unparam 116 # - unused 117 # - varcheck 118 # - whitespace 119 # - wsl 120 121 issues: 122 # Excluding configuration per-path, per-linter, per-text and per-source 123 exclude-rules: 124 - path: _test\.go 125 linters: 126 - gomnd 127 128 - path: pkg/golinters/errcheck.go 129 text: "SA1019: errCfg.Exclude is deprecated: use ExcludeFunctions instead" 130 - path: pkg/commands/run.go 131 text: "SA1019: lsc.Errcheck.Exclude is deprecated: use ExcludeFunctions instead" 132 133 # TODO must be removed after the release of the next version (v1.41.0) 134 - path: pkg/commands/run.go 135 linters: 136 - gomnd 137 # TODO must be removed after the release of the next version (v1.41.0) 138 - path: pkg/golinters/nolintlint/nolintlint.go 139 linters: 140 - gomnd 141 # TODO must be removed after the release of the next version (v1.41.0) 142 - path: pkg/printers/tab.go 143 linters: 144 - gomnd 145 146 147 run: 148 skip-dirs: 149 - test/testdata_etc 150 - internal/cache 151 - internal/renameio 152 - internal/robustio