# options for analysis running run: # timeout for analysis, e.g. 30s, 5m, default is 1m timeout: 1m # exit code when at least one issue was found, default is 1 issues-exit-code: 0 # include test files or not, default is true tests: false # which dirs to skip: issues from them won't be reported; # can use regexp here: generated.*, regexp is applied on full path; # default value is empty list, but default dirs are skipped independently # from this option's value (see skip-dirs-use-default). # "/" will be replaced by current OS file path separator to properly work # on Windows. skip-dirs: - wasm - static - node_modules - documents - docker - bind-* # default is true. Enables skipping of directories: # vendor$, third_party$, testdata$, examples$, Godeps$, builtin$ skip-dirs-use-default: true # by default isn't set. If set we pass it to "go list -mod={option}". From "go help modules": # If invoked with -mod=readonly, the go command is disallowed from the implicit # automatic updating of go.mod described above. Instead, it fails when any changes # to go.mod are needed. This setting is most useful to check that go.mod does # not need updates, such as in a continuous integration and testing system. # If invoked with -mod=vendor, the go command assumes that the vendor # directory holds the correct copies of dependencies and ignores # the dependency descriptions in go.mod. modules-download-mode: mod # Allow multiple parallel golangci-lint instances running. # If false (default) - golangci-lint acquires file lock on start. allow-parallel-runners: true # output configuration options output: # colored-line-number|line-number|json|tab|checkstyle|code-climate|junit-xml|github-actions # default is "colored-line-number" format: colored-line-number # print lines of code with issue, default is true print-issued-lines: true # print linter name in the end of issue text, default is true print-linter-name: true # make issues output unique by line, default is true uniq-by-line: true # add a prefix to the output file references; default is no prefix path-prefix: "" # sorts results by: filepath, line and column sort-results: false # all available settings of specific linters linters-settings: gofmt: # simplify code: gofmt with `-s` option, true by default simplify: true staticcheck: # Select the Go version to target. The default is '1.13'. go: "1.19" # https://staticcheck.io/docs/options#checks checks: ["all"] stylecheck: # Select the Go version to target. The default is '1.13'. go: "1.19" # https://staticcheck.io/docs/options#checks checks: ["all"] errcheck: # report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`; # default is false: such cases aren't reported by default. check-blank: true linters: enable: # go install github.com/kisielk/errcheck@latest # go install github.com/gordonklaus/ineffassign@latest # go install honnef.co/go/tools/cmd/staticcheck@latest # go install gitlab.com/opennota/check/cmd/varcheck@latest # go install github.com/go-critic/go-critic/cmd/gocritic@latest - errcheck - staticcheck - stylecheck - ineffassign - varcheck - gofmt - gocritic - wsl fast: false