github.com/telepresenceio/telepresence/v2@v2.20.0-pro.6.0.20240517030216-236ea954e789/.golangci.yml (about) 1 run: 2 build-tags: 3 - citest 4 modules-download-mode: readonly 5 6 issues: 7 # Give me the full output 8 max-same-issues: 0 9 10 # Use the default excludes... 11 exclude-use-default: false 12 # ...but also add some of our own 13 exclude: 14 - Error return value of `(\w+\.)+(Close|CloseSend|Flush|Remove|(Un)?Setenv|(Fp|P)rint(f|ln))\` is not checked 15 - 'structtag: struct field \w+ repeats json tag' 16 - 'Subprocess launched with function call as argument or cmd arguments' 17 exclude-rules: 18 - path: _test\.go 19 linters: 20 - const 21 - dupl 22 - gochecknoglobals 23 - goconst 24 - golint 25 - lll 26 - unparam 27 28 linters-settings: 29 cyclop: 30 max-complexity: 32 31 skip-tests: true 32 depguard: 33 rules: 34 main: 35 files: 36 - $all 37 deny: 38 - pkg: io/ioutil 39 desc: "`io/ioutil` is deprecated in Go 1.16, use `io` or `os` instead" 40 - pkg: os/exec 41 desc: "Use `github.com/datawire/dlib/dexec` instead of `os/exec`" 42 - pkg: syscall 43 desc: "Use `golang.org/x/sys/...` instead of `syscall`" 44 - pkg: github.com/golang/protobuf 45 desc: "Use `google.golang.org/protobuf` instead of `github.com/golang/protobuf`" 46 - pkg: github.com/kballard/go-shellquote 47 desc: "Use `github.com/telepresenceio/telepresence/pkg/shellquote.ShellString` instead of `github.com/kballard/go-shellquote.Join`" 48 - pkg: github.com/datawire/dlib/dutil 49 desc: "Use either `github.com/datawire/dlib/derror` or `github.com/datawire/dlib/dhttp` instead of `github.com/datawire/dlib/dutil`" 50 - pkg: golang.org/x/net/http2/h2c 51 desc: "Use `github.com/datawire/dlib/dhttp` instead of `golang.org/x/net/http2/h2c`" 52 gomodguard: 53 blocked: 54 modules: 55 - gotest.tools: { recommendations: ['github.com/stretchr/testify', 'github.com/google/go-cmp/cmp'] } 56 - gotest.tools/v2: { recommendations: ['github.com/stretchr/testify', 'github.com/google/go-cmp/cmp'] } 57 - gotest.tools/v3: { recommendations: ['github.com/stretchr/testify', 'github.com/google/go-cmp/cmp'] } 58 forbidigo: 59 forbid: 60 - '^os\.(DirEntry|FileInfo|FileMode|PathError)$' # deprecated in Go 1.16, import them from 'io/fs' instead 61 - '\.Readdir$' # deprecated in Go 1.16, use ReadDir instead 62 exclude_godoc_examples: false 63 64 gocyclo: 65 min-complexity: 35 66 67 gocognit: 68 min-complexity: 60 69 70 lll: 71 line-length: 180 72 tab-width: 2 73 74 nolintlint: 75 allow-unused: true # Needed because there's some linters disabled for 1.18 76 allow-leading-space: false 77 require-explanation: true 78 require-specific: true 79 allow-no-explanation: 80 - gocognit 81 linters: 82 # Enable specific linter 83 # https://golangci-lint.run/usage/linters/#enabled-by-default 84 enable: 85 - asasalint 86 - asciicheck 87 - bidichk 88 - bodyclose 89 - cyclop 90 - decorder 91 - depguard 92 - dogsled 93 - durationcheck 94 - errcheck 95 - errname 96 - execinquery 97 - exportloopref 98 - forbidigo 99 - gochecknoglobals 100 - gocognit 101 - gocritic 102 - gocyclo 103 - godot 104 - gofmt 105 - gofumpt 106 - goheader 107 - gomodguard 108 - goprintffuncname 109 - gosimple 110 - govet 111 - grouper 112 - importas 113 - ineffassign 114 - lll 115 - logrlint 116 - makezero 117 - misspell 118 - nakedret 119 - nolintlint 120 - nosprintfhostport 121 - prealloc 122 - predeclared 123 - reassign 124 - staticcheck 125 - unconvert 126 - unparam 127 - unused 128 - usestdlibvars 129 - whitespace 130 disable: 131 - containedctx 132 - contextcheck 133 - dupl 134 - errchkjson 135 - errorlint 136 - exhaustive 137 - exhaustruct 138 - forcetypeassert 139 - funlen 140 - gci 141 - gochecknoinits 142 - goconst 143 - goerr113 144 - godox 145 - goimports 146 - gomnd 147 - gomoddirectives 148 - gosec 149 - interfacebloat 150 - ireturn 151 - maintidx 152 - nestif 153 - nilerr 154 - nilnil 155 - nlreturn 156 - noctx 157 - nonamedreturns 158 - paralleltest 159 - promlinter 160 - revive 161 - rowserrcheck 162 - sqlclosecheck 163 - stylecheck 164 - tagliatelle 165 - tenv 166 - testpackage 167 - thelper 168 - tparallel 169 - typecheck 170 - varnamelen 171 - wastedassign 172 - wrapcheck 173 - wsl