Establish the project foundation with three packages: - core: shared types (Header, Metadata, Value, ObjectType, UUID generation) - db: SQLite migration framework, connection management (WAL, FK, busy timeout), transaction helpers (StartTX/EndTX), time conversion - config: runtime configuration (DB path, blob store, Minio, gRPC addr) Includes initial schema migration (001_initial.sql) with 13 tables covering shared infrastructure, bibliographic data, and artifact repository. Full test coverage for all packages, strict linting (.golangci.yaml), and Makefile. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
92 lines
1.6 KiB
YAML
92 lines
1.6 KiB
YAML
# golangci-lint v2 configuration.
|
|
# Principle: fail loudly. Correctness issues are errors, not warnings.
|
|
|
|
version: "2"
|
|
|
|
run:
|
|
timeout: 5m
|
|
tests: true
|
|
|
|
linters:
|
|
default: none
|
|
enable:
|
|
# --- Correctness ---
|
|
- errcheck
|
|
- govet
|
|
- ineffassign
|
|
- unused
|
|
|
|
# --- Error handling ---
|
|
- errorlint
|
|
|
|
# --- Security ---
|
|
- gosec
|
|
- staticcheck
|
|
|
|
# --- Style / conventions ---
|
|
- revive
|
|
|
|
settings:
|
|
errcheck:
|
|
check-blank: false
|
|
check-type-assertions: true
|
|
|
|
govet:
|
|
enable-all: true
|
|
disable:
|
|
- shadow
|
|
- fieldalignment
|
|
|
|
gosec:
|
|
severity: medium
|
|
confidence: medium
|
|
excludes:
|
|
- G104
|
|
|
|
errorlint:
|
|
errorf: true
|
|
asserts: true
|
|
comparison: true
|
|
|
|
revive:
|
|
rules:
|
|
- name: error-return
|
|
severity: error
|
|
- name: unexported-return
|
|
severity: error
|
|
- name: error-strings
|
|
severity: warning
|
|
- name: if-return
|
|
severity: warning
|
|
- name: increment-decrement
|
|
severity: warning
|
|
- name: var-naming
|
|
severity: warning
|
|
- name: range
|
|
severity: warning
|
|
- name: time-naming
|
|
severity: warning
|
|
- name: indent-error-flow
|
|
severity: warning
|
|
- name: early-return
|
|
severity: warning
|
|
|
|
formatters:
|
|
enable:
|
|
- gofmt
|
|
- goimports
|
|
|
|
issues:
|
|
max-issues-per-linter: 0
|
|
max-same-issues: 0
|
|
|
|
exclusions:
|
|
paths:
|
|
- vendor
|
|
- ark
|
|
rules:
|
|
- path: "_test\\.go"
|
|
linters:
|
|
- gosec
|
|
text: "G101"
|