# options for analysis running run: # timeout for analysis, e.g. 30s, 5m, default is 1m timeout: 5m modules-download-mode: readonly # list of useful linters could be found at https://github.com/golangci/awesome-go-linters linters: disable-all: true enable: - bidichk - deadcode - errcheck - exportloopref - depguard - gci - gofumpt - goimports - gosimple - govet - ineffassign - makezero - megacheck - misspell - noctx - nolintlint - revive - rowserrcheck - sqlclosecheck - staticcheck - structcheck - stylecheck - unconvert - unused - varcheck - wastedassign issues: exclude-use-default: false exclude-rules: - linters: - revive text: "context.Context should be the first parameter of a function" path: "_test.go" - linters: - errcheck text: "Error return value of `[^`]+.(Close|Serve)` is not checked" - linters: - errcheck path: "cmd/gitaly-wrapper/main.go" text: "Error return value of `cmd.Wait` is not checked" - linters: - errcheck path: "internal/praefect/nodes/local_elector.go" text: "Error return value of `s.checkNodes` is not checked" - linters: - errcheck path: "internal/praefect/nodes/manager.go" text: "Error return value of `strategy.checkNodes` is not checked" - linters: - errcheck path: "internal/praefect/nodes/sql_elector.go" text: "Error return value of `s.checkNodes` is not checked" - linters: - errcheck path: "internal/middleware/limithandler/limithandler.go" text: "Error return value of `limiter.Limit` is not checked" - linters: - errcheck path: "internal/supervisor/supervisor.go" text: "Error return value of `(cmd.Process.Kill)?` is not checked" - linters: - errcheck path: "internal/gitaly/rubyserver/worker.go" text: "Error return value of `syscall.Kill` is not checked" - linters: - errcheck path: "internal/command/command.go" text: "Error return value of `syscall.Kill` is not checked" - linters: - stylecheck text: "at least one file in a package should have a package comment" # Maximum issues count per one linter. Set to 0 to disable. Default is 50. max-issues-per-linter: 0 # Maximum count of issues with the same text. Set to 0 to disable. Default is 3. max-same-issues: 0 linters-settings: depguard: list-type: blacklist include-go-root: true packages-with-error-message: - io/ioutil: "ioutil is deprecated starting with Go 1.16"