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