version: "2" linters: default: none enable: - bodyclose - copyloopvar - dogsled - dupl - errcheck - errorlint - funlen - gocheckcompilerdirectives - goconst - gocritic - gocyclo # - godox # TODOs/FIXMEs are intentional markers - mnd - goprintffuncname - gosec - govet - ineffassign - lll - misspell - nakedret - nolintlint - revive - staticcheck - testifylint - unconvert - unparam - unused - whitespace settings: dupl: threshold: 150 funlen: lines: -1 statements: 50 goconst: min-len: 2 min-occurrences: 20 ignore-string-values: - "^(bool|int|string|error|engine\\.webkit|>=0)$" gocritic: enabled-tags: - diagnostic - experimental - opinionated - performance - style disabled-checks: - dupImport - ifElseChain - octalLiteral - whyNoLint - unnamedResult - hugeParam - singleCaseSwitch gocyclo: min-complexity: 20 mnd: checks: - argument - case - condition - return ignored-numbers: - '0' - '1' - '2' - '3' - '4' - '5' - '10' - '16' - '32' - '64' - '100' - '1000' ignored-functions: - strings.SplitN - make - time.Sleep - time.Duration - strconv.ParseInt - strconv.ParseUint - strconv.ParseFloat govet: enable: - nilness - shadow errorlint: asserts: false lll: line-length: 140 misspell: locale: US nolintlint: allow-unused: false require-explanation: true require-specific: true revive: rules: - name: indent-error-flow - name: unused-parameter - name: unused-receiver exclusions: generated: lax paths: - vendor rules: # Test files get relaxed rules - path: _test\.go linters: - dupl - mnd - lll - funlen - goconst - errcheck - gosec # Generated SQL code - path: internal/db/.*\.sql\.go linters: - all - path: internal/db/models\.go linters: - unused # gosec false positives - text: "G115:" linters: - gosec - text: "G404:" linters: - gosec - text: "G301:" linters: - gosec - text: "G302:" linters: - gosec - text: "G306:" linters: - gosec - text: "G204:" linters: - gosec # CEF/OpenGL interop requires unsafe pointer arithmetic - path: internal/infrastructure/cef/ text: "G103:" linters: - gosec - text: "G304:" linters: - gosec - path: internal/bootstrap/session\.go text: "G703:" linters: - gosec - path: internal/infrastructure/updater/github\.go text: "G704:" linters: - gosec # GTK callbacks require unused parameters - path: internal/ui/ text: "unused-parameter" linters: - revive - path: internal/ui/ text: "unused-receiver" linters: - revive # Adapter structs intentionally keep receivers for interface compliance - path: internal/infrastructure/.*adapter\.go text: "unused-receiver" linters: - revive # CEF handler/stub methods must keep receivers for interface compliance - path: internal/infrastructure/cef/ text: "unused-receiver" linters: - revive run: timeout: 20m modules-download-mode: readonly build-tags: - webkit_cgo