Files
go-telegram/.golangci.yml
T
lukaszraczylo ac7cae8fa7 Initial release of go-telegram
A fully-generated, strongly-typed Go client for the Telegram Bot API.

* 176 methods + 301 types generated from Bot API v10.0
* 1408 auto-generated tests (8 scenarios per method)
* Typed unions throughout — no 'any' in the public surface
* Pluggable HTTP transport and JSON codec (default goccy/go-json)
* Built-in retry middleware honouring Telegram's retry_after
* Generic dispatcher with filters and conversation handlers
* Self-verifying codegen pipeline (regen → audit → emit → run tests)
* 14 example bots covering common patterns
2026-05-09 13:09:27 +01:00

73 lines
1.5 KiB
YAML

version: "2"
linters:
default: none
enable:
- govet
- staticcheck
- unused
- errcheck
- gosec
settings:
unused:
field-writes-are-uses: true
post-statements-are-reads: true
exported-is-used: true
exported-fields-are-used: true
govet:
enable-all: true
disable:
- fieldalignment # Field order is intentional per project spec; alignment not enforced.
staticcheck:
checks: ["all"]
exclusions:
presets:
- common-false-positives
rules:
- path: _test\.go
linters:
- unused
- errcheck
- path: \.pb\.go$
linters:
- all
- path: transport/backoff\.go
linters:
- gosec
text: "G404" # math/rand/v2 acceptable for jitter
- path: cmd/scrape/
linters:
- gosec
text: "G306" # 0o644 intentional: output files are world-readable docs artifacts
- path: cmd/audit/
linters:
- gosec
text: "G204" # git subprocess with CLI flag path — intentional operator tool
- path: cmd/audit/.*_test\.go
linters:
- gosec
text: "G302" # test helper sets 0o755 on fake git binary — executable permission intentional
formatters:
enable:
- gofmt
settings:
gofmt:
simplify: true
run:
timeout: 5m
tests: true
modules-download-mode: readonly
output:
formats:
text:
path: stdout
colors: true
sort-results: true