Add project configuration, documentation and development tooling: - flake.nix dev shell with Go, golangci-lint, turbojpeg - .envrc sourcing sops-encrypted .secrets.env - golangci-lint v2 config - opencode.json MCP + LSP wiring - AGENTS.md development guidelines
49 lines
1.1 KiB
YAML
49 lines
1.1 KiB
YAML
version: "2"
|
|
|
|
run:
|
|
timeout: 5m
|
|
tests: true
|
|
|
|
linters:
|
|
default: none
|
|
enable:
|
|
- errcheck
|
|
- govet
|
|
- staticcheck
|
|
- ineffassign
|
|
- unused
|
|
- misspell
|
|
- revive
|
|
- gosec
|
|
- nakedret
|
|
- unconvert
|
|
- gocritic
|
|
exclusions:
|
|
# Cgo-heavy capture/protocol code may need exceptions for specific patterns.
|
|
rules:
|
|
- path: _test\.go
|
|
linters:
|
|
- gosec
|
|
# Wire-format int conversions: the Teleport protocol defines 32-bit fields
|
|
# on the wire (uint32) while the reference uses int32 struct fields. These
|
|
# casts are intentional and mirror obs-teleport's types.go.
|
|
- path: "internal/protocol/"
|
|
linters:
|
|
- gosec
|
|
text: "G115"
|
|
# gocritic mis-parses cgo calls with multiple pointer args (&jpegSize,
|
|
# &dstPtr) as suspicious == comparisons.
|
|
- path: "internal/protocol/jpeg\\.go"
|
|
linters:
|
|
- gocritic
|
|
text: "dupSubExpr"
|
|
# Dialogue box pixel math is clamped by n<=4 in the avg loop.
|
|
- path: "cmd/teleportfling/"
|
|
linters:
|
|
- gosec
|
|
text: "G115"
|
|
|
|
formatters:
|
|
enable:
|
|
- gofmt
|
|
- goimports |