version: "2" linters: default: all disable: - depguard # not sensible for us - dupword # extremely normal in tests and a pretty unnecessary linter - goconst # unnecessary especially for our parsing code; many false positives - mnd # same as above - lll # poor standard - ireturn # not an issue - perfsprint # silly fmt.Errorf vs errors.New suggestion - gosmopolitan # completely normal to have CJK and such in tests - gochecknoglobals # unlikely to be introduce accidentally and are usually intentional - nonamedreturns # named returns are often good for clarity - errname # ErrXXX is better than XXXError - wsl # outdated, use wsl_v5 instead - varnamelen # it's rather reasonable to have counters like i, even when it spans quite a bit - gocyclo # cyclomatic metrics aren't that good - cyclop # cyclomatic metrics aren't that good - godox # TODO/etc comments are allowed in our codebase - funlen # long functions are fine - wrapcheck # rules around interface-return methods are a bit silly - exhaustruct # tmp: should fix... but too annoying at the moment - err113 # tmp: will enable when we properly use defined errors - gocognit # tmp: should consider sometime settings: gosec: excludes: - G301 # UNIX permissions - G306 # UNIX permissions revive: rules: - name: error-strings disabled: true issues: max-issues-per-linter: 0 max-same-issues: 0