github.com/NpoolPlatform/chain-middleware@v0.0.0-20240228100535-eb1bcf896eb9/.golangci.yml (about) 1 linters-settings: 2 dupl: 3 threshold: 100 4 funlen: 5 lines: 100 6 statements: 50 7 goconst: 8 min-len: 2 9 min-occurrences: 3 10 gocritic: 11 enabled-tags: 12 - diagnostic 13 - experimental 14 - opinionated 15 - performance 16 - style 17 disabled-checks: 18 - dupImport # https://github.com/go-critic/go-critic/issues/845 19 - ifElseChain 20 - octalLiteral 21 - whyNoLint 22 - wrapperFunc 23 gocyclo: 24 min-complexity: 15 25 goimports: 26 local-prefixes: github.com/golangci/golangci-lint 27 gomnd: 28 # don't include the "operation" and "assign" 29 checks: 30 - argument 31 - case 32 - condition 33 - return 34 ignored-numbers: 35 - '0' 36 - '1' 37 - '2' 38 - '3' 39 ignored-functions: 40 - strings.SplitN 41 42 lll: 43 line-length: 180 44 misspell: 45 locale: US 46 nolintlint: 47 allow-leading-space: true # don't require machine-readable nolint directives (i.e. with no leading space) 48 allow-unused: false # report any unused nolint directives 49 require-explanation: false # don't require an explanation for nolint directives 50 require-specific: false # don't require nolint directives to be specific about which linter is being skipped 51 52 linters: 53 disable-all: true 54 enable: 55 - bodyclose 56 - deadcode 57 - depguard 58 - dogsled 59 - dupl 60 - errcheck 61 - exportloopref 62 - funlen 63 - goconst 64 - gocritic 65 - gocyclo 66 - gofmt 67 - goimports 68 - gomnd 69 - goprintffuncname 70 - gosec 71 - gosimple 72 - govet 73 - ineffassign 74 - lll 75 - misspell 76 - nakedret 77 - noctx 78 - nolintlint 79 - staticcheck 80 - structcheck 81 - stylecheck 82 - typecheck 83 - unconvert 84 - unparam 85 - unused 86 - varcheck 87 - whitespace 88 89 # don't enable: 90 # - asciicheck 91 # - scopelint 92 # - gochecknoglobals 93 # - gochecknoinits 94 # - gocognit 95 # - godot 96 # - godox 97 # - goerr113 98 # - interfacer 99 # - maligned 100 # - nestif 101 # - prealloc 102 # - testpackage 103 # - revive 104 # - wsl 105 106 issues: 107 # Excluding configuration per-path, per-linter, per-text and per-source 108 exclude-rules: 109 - path: _test\.go 110 linters: 111 - gomnd 112 113 - path: pkg/golinters/errcheck.go 114 text: "SA1019: errCfg.Exclude is deprecated: use ExcludeFunctions instead" 115 - path: pkg/commands/run.go 116 text: "SA1019: lsc.Errcheck.Exclude is deprecated: use ExcludeFunctions instead" 117 - path: pkg/commands/run.go 118 text: "SA1019: e.cfg.Run.Deadline is deprecated: Deadline exists for historical compatibility and should not be used." 119 120 run: 121 timeout: 5m 122 go: '1.17' # TODO(ldez): we force to use an old version of Go for the CI and the tests.