github.com/developest/gtm-core@v1.0.4-0.20220111132249-cc80a3372c3f/.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: 180 14 statements: 80 15 gci: 16 local-prefixes: github.com/golangci/golangci-lint 17 goconst: 18 min-len: 2 19 min-occurrences: 3 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: 18 35 goimports: 36 local-prefixes: github.com/golangci/golangci-lint 37 golint: 38 min-confidence: 0 39 gomnd: 40 settings: 41 mnd: 42 # don't include the "operation" and "assign" 43 checks: argument,case,condition,return 44 govet: 45 check-shadowing: true 46 settings: 47 printf: 48 funcs: 49 - (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof 50 - (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf 51 - (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf 52 - (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf 53 lll: 54 line-length: 100 55 maligned: 56 suggest-new: true 57 misspell: 58 locale: US 59 nolintlint: 60 allow-leading-space: true # don't require machine-readable nolint directives (i.e. with no leading space) 61 allow-unused: false # report any unused nolint directives 62 require-explanation: false # don't require an explanation for nolint directives 63 require-specific: false # don't require nolint directives to be specific about which linter is being skipped 64 65 linters: 66 # please, do not use `enable-all`: it's deprecated and will be removed soon. 67 # inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint 68 disable-all: true 69 enable: 70 - bodyclose 71 - deadcode 72 - depguard 73 - dogsled 74 - dupl 75 - errcheck 76 - exhaustive 77 - funlen 78 - gochecknoinits 79 - goconst 80 - gocritic 81 - gocyclo 82 - gofmt 83 - goimports 84 - golint 85 - gomnd 86 - goprintffuncname 87 - gosimple 88 - interfacer 89 - lll 90 - misspell 91 - nakedret 92 - noctx 93 - nolintlint 94 - rowserrcheck 95 - scopelint 96 - structcheck 97 - typecheck 98 - unconvert 99 - unparam 100 - unused 101 - varcheck 102 - whitespace 103 104 # don't enable: 105 # - asciicheck 106 # - gochecknoglobals 107 # - gocognit 108 # - godot 109 # - godox 110 # - goerr113 111 # - maligned 112 # - nestif 113 # - prealloc 114 # - testpackage 115 # - wsl 116 117 issues: 118 # Excluding configuration per-path, per-linter, per-text and per-source 119 exclude-rules: 120 - path: _test\.go 121 linters: 122 - gomnd 123 - dupl 124 - funlen 125 - lll 126 127 # https://github.com/go-critic/go-critic/issues/926 128 - linters: 129 - gocritic 130 text: "unnecessaryDefer:" 131 132 133 run: 134 # default concurrency is a available CPU number 135 concurrency: 4 136 # timeout for analysis, e.g. 30s, 5m, default is 1m 137 deadline: 4m