Files
petere ba423eb944 refactor: extract streaming engine into internal/flinger
Move the capture/encode/send pipeline out of cmd/teleportfling into a
GUI-free Engine so the CLI and the desktop app share one implementation:
- flinger: Config/Engine/Status, audio+video+stats loops, pattern source
- config: JSON persistence at ~/.config/teleportfling/config.json
- cmd/teleportfling: thin CLI wrapper around the engine (same flags)
- golangci: extend exclusions to flinger/config
2026-09-18 20:32:45 +01:00

53 lines
1.3 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|internal/flinger)/"
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"
# Config path comes from os.UserConfigDir(); safe to read/write.
- path: "internal/config/"
linters:
- gosec
formatters:
enable:
- gofmt
- goimports