run: tests: true build-tags: - integration - fuzz # fail if go.mod needs changing modules-download-mode: readonly linters-settings: govet: enable-all: true disable: - composites # same as exhaustruct below - fieldalignment asasalint: exclude: - glog\.Infof linters: presets: - bugs - error - format - import - module - performance - test - unused - metalinter # A general rule is if the lint author can't be bothered supplying automated # fixes for obvious lint warnings, I'm not bothered using their tool. disable: - cyclop # boo cyclomatic complexity - dupl # exclude test code - depguard - errcheck # handled by gosec, lots of false posi - exhaustive # this false-positives for switches with a default - exhaustruct # above, renamed - forbidigo # exclude non prod tools - forcetypeassert # too many at the moment - funlen # My tests will be as long as they need to be thanks - gci - gochecknoglobals # Flags are fine, as are test tables. - gochecknoinits # How dare you tell me not to use inits. - gocognit # boo cyclomatic complexity - gocyclo # boo cyclomatic complexity - godox # TODOs are fine - gosec # run independently - lll # go says long lines are ok, and this is trivially automatable - musttag # don't agree with the premise - nakedret # weird thing to report on - nestif # cognitive complexity - nlreturn # Not a fan of this one, looks messy - nolintlint # broken on gocritic - paralleltest # i had a good reason for this - perfsprint - testpackage # need to test internal methods - unparam # too noisy - whitespace # broken by goyacc - wrapcheck # not sure this is necessary - wsl # wsl doesn't explain any of its recommendations issues: # Show everything. max-issues-per-linter: 0 max-same-issues: 0 exclude-use-default: true exclude: # `gofix` should fix this if it really cared - 'composite literal uses unkeyed fields' # I like common patterns of shadowing: ctx and err - 'declaration of "ctx" shadows declaration' - 'declaration of "err" shadows declaration' # goyacc generated error in three locations - 'this value of `mtailDollar.* is never used' # Incorrectly reports undeclared in same package - "undeclared name:" # Disagree with capitalisation of identifier names - "ST1003:"