github.com/anchore/syft@v1.38.2/.golangci.yaml (about) 1 version: "2" 2 run: 3 tests: false 4 linters: 5 default: none 6 enable: 7 - asciicheck 8 - bodyclose 9 - copyloopvar 10 - dogsled 11 - dupl 12 - errcheck 13 - funlen 14 - gocognit 15 - goconst 16 - gocritic 17 - gocyclo 18 - goprintffuncname 19 - gosec 20 - govet 21 - ineffassign 22 - misspell 23 - nakedret 24 - nolintlint 25 - revive 26 - staticcheck 27 - unconvert 28 - unparam 29 - unused 30 - whitespace 31 settings: 32 funlen: 33 lines: 70 34 statements: 50 35 gocritic: 36 enabled-checks: 37 - deferInLoop 38 - ruleguard 39 settings: 40 ruleguard: 41 rules: test/rules/rules.go 42 gosec: 43 excludes: 44 - G115 45 exclusions: 46 generated: lax 47 presets: 48 - comments 49 - common-false-positives 50 - legacy 51 - std-error-handling 52 rules: 53 # internal/os contains OS feature detection logic; the name reflects its purpose 54 - linters: 55 - revive 56 path: internal/os/ 57 text: "var-naming: avoid package names that conflict" 58 paths: 59 - third_party$ 60 - builtin$ 61 - examples$ 62 63 # do not enable... 64 # - deadcode # The owner seems to have abandoned the linter. Replaced by "unused". 65 # - depguard # We don't have a configuration for this yet 66 # - goprintffuncname # does not catch all cases and there are exceptions 67 # - nakedret # does not catch all cases and should not fail a build 68 # - gochecknoglobals 69 # - gochecknoinits # this is too aggressive 70 # - rowserrcheck disabled per generics https://github.com/golangci/golangci-lint/issues/2649 71 # - godot 72 # - godox 73 # - goerr113 74 # - goimports # we're using gosimports now instead to account for extra whitespaces (see https://github.com/golang/go/issues/20818) 75 # - golint # deprecated 76 # - gomnd # this is too aggressive 77 # - interfacer # this is a good idea, but is no longer supported and is prone to false positives 78 # - lll # without a way to specify per-line exception cases, this is not usable 79 # - maligned # this is an excellent linter, but tricky to optimize and we are not sensitive to memory layout optimizations 80 # - nestif 81 # - prealloc # following this rule isn't consistently a good idea, as it sometimes forces unnecessary allocations that result in less idiomatic code 82 # - rowserrcheck # not in a repo with sql, so this is not useful 83 # - scopelint # deprecated 84 # - structcheck # The owner seems to have abandoned the linter. Replaced by "unused". 85 # - testpackage 86 # - varcheck # The owner seems to have abandoned the linter. Replaced by "unused". 87 # - wsl # this doens't have an auto-fixer yet and is pretty noisy (https://github.com/bombsimon/wsl/issues/90) 88 89 issues: 90 max-same-issues: 25 91 uniq-by-line: false 92 93 # TODO: enable this when we have coverage on docstring comments 94 # # The list of ids of default excludes to include or disable. 95 # include: 96 # - EXC0002 # disable excluding of issues about comments from golint 97 98 formatters: 99 enable: 100 - gofmt 101 - goimports 102 exclusions: 103 generated: lax 104 paths: 105 - third_party$ 106 - builtin$ 107 - examples$