vitess.io/vitess@v0.16.2/.golangci.yml (about) 1 run: 2 go: 1.19 3 timeout: 10m 4 skip-dirs: 5 - go/vt/topo/k8stopo/client 6 7 linters-settings: 8 errcheck: 9 exclude: ./misc/errcheck_excludes.txt 10 goimports: 11 local-prefixes: vitess.io/vitess 12 govet: 13 disable: # not supported when using Generics in 1.18 14 - nilness 15 - unusedwrite 16 17 linters: 18 disable-all: true 19 enable: 20 # Defaults 21 - errcheck 22 - govet 23 - ineffassign 24 - typecheck 25 - staticcheck 26 - gosimple 27 28 # Extras 29 - gofmt 30 - goimports 31 - exportloopref 32 - bodyclose 33 34 # revive is a replacement for golint, but we do not run it in CI for now. 35 # This is only enabled as a post-commit hook 36 # - revive 37 38 issues: 39 exclude-rules: 40 - path: '^go/vt/proto/' 41 linters: 42 - errcheck 43 - goimports 44 45 ### BEGIN: errcheck exclusion rules. Each rule should be considered 46 # a TODO for removal after adding error checks to that package/file/etc, 47 # except where otherwise noted. 48 - path: '^go/cmd/(vtcombo|vtgateclienttest|vtorc)/' 49 linters: 50 - errcheck 51 - path: '^go/mysql/' 52 linters: 53 - errcheck 54 - path: '^go/mysql/collations' 55 linters: 56 - revive 57 - path: '^go/pools/.*_test.go' 58 linters: 59 - errcheck 60 - path: '^go/sqltypes/' 61 linters: 62 - errcheck 63 - path: '^go/stats/statsd/' 64 linters: 65 - errcheck 66 - path: '^go/test/' 67 linters: 68 - errcheck 69 - path: '^go/vt/automation/' 70 linters: 71 - errcheck 72 - path: '^go/vt/mysqlctl/' 73 linters: 74 - errcheck 75 # (NB: @ajm188) Technically, the below `exclude-rules` for `go/vt/orchestrator/external` is 76 # redundant with this line, but we actually want to permanently ignore orchestrator's 77 # vendored code, so we are keeping the exclusion rules separate because this one 78 # should be temporary while the latter should be permanent. 79 - path: '^go/vt/orchestrator/' 80 linters: 81 - errcheck 82 # This subtree should be permanently excluded, as it's vendored code. 83 - path: '^go/vt/orchestrator/external/' 84 linters: 85 - errcheck 86 - path: '^go/vt/schemamanager/' 87 linters: 88 - errcheck 89 - path: '^go/vt/servenv/' 90 linters: 91 - errcheck 92 # This code is autogenerated and should be permanently excluded. 93 - path: '^go/vt/sqlparser/(ast_format|ast_format_fast).go' 94 linters: 95 - errcheck 96 - path: '^go/vt/sqlparser/goyacc' 97 linters: 98 - errcheck 99 - path: '^go/vt/throttler/.*_test.go' 100 linters: 101 - errcheck 102 - path: '^go/vt/topo/.*/*._test.go' 103 linters: 104 - errcheck 105 - path: '^go/vt/vtcombo/' 106 linters: 107 - errcheck 108 - path: '^go/vt/vtctl/[^/]*.go' 109 linters: 110 - errcheck 111 - path: '^go/vt/vtctl/grpcvtctlclient/' 112 linters: 113 - errcheck 114 - path: '^go/vt/vtctl/grpcvtctlserver/' 115 linters: 116 - errcheck 117 - path: '^go/vt/vtctld/(schema|.*_test).go' 118 linters: 119 - errcheck 120 - path: '^go/vt/vtexplain/' 121 linters: 122 - errcheck 123 - path: '^go/vt/vtgate/.*_test.go' 124 linters: 125 - errcheck 126 - path: '^go/vt/vtgr/' 127 linters: 128 - errcheck 129 - path: '^go/vt/vttablet/(customrule|filelogger|grpctmserver|onlineddl|sandboxconn|tabletserver)/' 130 linters: 131 - errcheck 132 - path: '^go/vt/vttablet/tabletmanager/vreplication' 133 linters: 134 - errcheck 135 - path: '^go/vt/vttablet/(.*endtoend.*|.*_test.go)' 136 linters: 137 - errcheck 138 - path: '^go/vt/vttest' 139 linters: 140 - errcheck 141 - path: '^go/vt/worker' 142 linters: 143 - errcheck 144 - path: '^go/vt/workflow' 145 linters: 146 - errcheck 147 - path: '^go/vt/wrangler' 148 linters: 149 - errcheck 150 - path: '^go/vt/zkctl' 151 linters: 152 - errcheck 153 ### END: errcheck exclusion rules 154 155 # https://github.com/golangci/golangci/wiki/Configuration 156 service: 157 golangci-lint-version: 1.51.2 # use the fixed version to not introduce new linters unexpectedly