# This file contains all available configuration options # with their default values. # options for analysis running run: # default concurrency is a available CPU number #concurrency: 4 # timeout for analysis, e.g. 30s, 5m, default is 1m deadline: 30m # include test files or not, default is true tests: false # 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 # all available settings of specific linters linters-settings: 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 govet: # report about shadowed variables check-shadowing: true golint: # minimal confidence for issues, default is 0.8 min-confidence: 0.3 gocyclo: # minimal code complexity to report, 30 by default (but we recommend 10-20) min-complexity: 20 dupl: # tokens count to trigger issue, 150 by default threshold: 200 lll: # max line length, lines longer will be reported. Default is 120. # '\t' is counted as 1 character by default, and can be changed with the tab-width option line-length: 150 funlen: statements: 50 lines: 150 cyclop: # The maximal code complexity to report. # Default: 10 max-complexity: 15 # The maximal average package complexity. # If it's higher than 0.0 (float) the check is enabled # Default: 0.0 package-average: 0.0 revive: rules: # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#import-alias-naming - name: import-alias-naming severity: warning disabled: false exclude: [""] arguments: - "^[a-z][a-z0-9]{0,}$_" # Or this parameter: - allowRegex: "^[a-z][a-z0-9]{0,}$_" denyRegex: '^v\d+$' linters: enable-all: true disable: - gci - err113 - exhaustruct - gochecknoglobals - whitespace - wsl - wrapcheck - nlreturn - gofmt - gofumpt - depguard - govet - tagliatelle - stylecheck fast: false issues: max-issues-per-linter: 0 max-same-issues: 0 exclude-rules: # Exclude lll issues for long lines with go:generate - linters: - lll source: "^//go:generate " - linters: - golint text: "receiver name should be a reflection of its identity" # which files to skip: they will be analyzed, but issues from them # won't be reported. Default value is empty list, but there is # no need to include all autogenerated files, we confidently recognize # autogenerated files. If it's not please let us know. skip-files: - "_easyjson.go" - ".pb.go" # which dirs to skip: they won't be analyzed; # can use regexp here: generated.*, regexp is applied on full path; # default value is empty list, but next dirs are always skipped independently # from this option's value: # vendor$, third_party$, testdata$, examples$, Godeps$, builtin$ skip-dirs: - bin$ - \.git$ - etc$ - protobuf$ - scripts$ - vendor$ - ^benches/ output: formats: tab