# golangci-lint v2 configuration for Oikos # Docs: https://golangci-lint.run/usage/configuration/ # Default-enabled linters (errcheck, govet, ineffassign, staticcheck, unused) # are not listed below. gosimple/typecheck were absorbed into staticcheck in v2. version: "2" run: tests: true linters: enable: - depguard - misspell - revive settings: depguard: # ADR 0016 dependency rules. The nomos packages (and their bans) were # removed with the nomos decommission — the agent runtime is dsh, an # external MCP client. rules: core-no-agent-tech: files: - "**/internal/core/**" deny: - pkg: github.com/openai/openai-go desc: core never links the LLM SDK — the agent is an external client - pkg: github.com/openai/openai-go/** desc: core never links the LLM SDK — the agent is an external client - pkg: github.com/modelcontextprotocol/go-sdk desc: core never links MCP packages — mcpserver is a driving adapter - pkg: github.com/modelcontextprotocol/go-sdk/** desc: core never links MCP packages — mcpserver is a driving adapter core-purity: files: - "**/internal/core/**" deny: - pkg: github.com/dtoro/oikos/internal/adapters desc: core must not import adapters — depend on core/ports instead - pkg: github.com/dtoro/oikos/internal/adapters/** desc: core must not import adapters — depend on core/ports instead - pkg: github.com/dtoro/oikos/cmd desc: core must not import composition roots - pkg: github.com/dtoro/oikos/cmd/** desc: core must not import composition roots errcheck: # Allow unchecked errors on common Close/Flush patterns (deferred cleanup) exclude-functions: - (io.Closer).Close - (*os.File).Close exclusions: generated: lax rules: - linters: - errcheck path: _test\.go - linters: - all path: internal/httpapi/gen/ - linters: - all path: internal/adapters/postgres/sqlcgen/ paths: - third_party$ - builtin$ - examples$ issues: max-issues-per-linter: 0 max-same-issues: 0 formatters: exclusions: generated: lax paths: - third_party$ - builtin$ - examples$