|
| 1 | +version: "2" |
| 2 | + |
| 3 | +formatters: |
| 4 | + enable: |
| 5 | + - gofmt |
| 6 | + - goimports |
| 7 | + settings: |
| 8 | + goimports: |
| 9 | + local-prefixes: |
| 10 | + - github.com/mickamy/scrollback |
| 11 | + |
| 12 | +linters: |
| 13 | + default: all |
| 14 | + settings: |
| 15 | + errcheck: |
| 16 | + exclude-functions: |
| 17 | + - fmt.Fprint |
| 18 | + - fmt.Fprintf |
| 19 | + - fmt.Fprintln |
| 20 | + tagliatelle: |
| 21 | + case: |
| 22 | + rules: |
| 23 | + json: snake |
| 24 | + yaml: snake |
| 25 | + usetesting: |
| 26 | + context-background: true |
| 27 | + context-todo: true |
| 28 | + os-mkdir-temp: true |
| 29 | + os-setenv: true |
| 30 | + os-chdir: true |
| 31 | + enable: |
| 32 | + - gomodguard_v2 |
| 33 | + disable: |
| 34 | + - cyclop # Redundant; cognitive complexity is already tracked by gocognit |
| 35 | + - depguard # Import restrictions are not currently required for this internal architecture |
| 36 | + - dogsled # Multiple blank identifiers are unavoidable with some stdlib functions (e.g., runtime.Caller) |
| 37 | + - dupl # High false-positive rate in test suites where setup code is similar |
| 38 | + - err113 # Sentinel errors are used where meaningful; contextual fmt.Errorf is preferred elsewhere |
| 39 | + - exhaustruct # Hinders use of default values; too boilerplate-heavy for large structs |
| 40 | + - forbidigo # Essential for CLI tools that rely on fmt.Print for user output |
| 41 | + - funlen # Testing logic and table-driven tests naturally exceed standard length |
| 42 | + - gochecknoglobals # Necessary for certain package-level configurations or singleton patterns |
| 43 | + - gochecknoinits # Required for specific library registrations and setup hooks |
| 44 | + - gocognit # Thresholds are often too low for complex but necessary business logic |
| 45 | + - goconst # Repeated strings in tests are clearer than abstract constants |
| 46 | + - godot # Punctuation in comments is a stylistic choice, not a code quality issue |
| 47 | + - gomoddirectives # Local replace directives are needed for the example module |
| 48 | + - gomodguard # Deprecated; use gomodguard_v2 instead |
| 49 | + - ireturn # Returning interfaces is a valid design pattern in this project's architecture |
| 50 | + - mnd # "Magic numbers" are often self-explanatory (e.g., status codes, time units) |
| 51 | + - nestif # Deep nesting is sometimes the most readable way to handle complex logic |
| 52 | + - nlreturn # Forcing newlines before returns is purely stylistic and often disruptive |
| 53 | + - noinlineerr # Inline error handling (if err := ...; err != nil) is idiomatic Go |
| 54 | + - nonamedreturns # Named returns improve documentation and clarity for complex signatures |
| 55 | + - recvcheck # Value receivers are preferred when the receiver is not mutated |
| 56 | + - revive # Most rules are already covered by more specialized linters |
| 57 | + - thelper # Main value (begin check) conflicts with table-driven test closures; remaining checks are trivial |
| 58 | + - varnamelen # Short, idiomatic names (i, k, v) are preferred in concise Go code |
| 59 | + - wsl # Excessive whitespace enforcement often degrades code density and readability |
| 60 | + - wsl_v5 # Same as wsl; v5 variant also enforces excessive whitespace rules |
| 61 | + exclusions: |
| 62 | + rules: |
| 63 | + - path: _test\.go |
| 64 | + linters: |
| 65 | + - gocyclo # Each table case adds branches, so cyclomatic complexity climbs naturally and isn't a quality signal there. |
| 66 | + - maintidx # Same: table-driven tests grow long by design and the maintainability index is not a useful signal there. |
| 67 | + |
| 68 | +issues: |
| 69 | + max-issues-per-linter: 0 |
| 70 | + max-same-issues: 0 |
0 commit comments