chore: add linter config and CI pipeline #20

Merged
lerko merged 5 commits from chore/linter-ci-pipeline into main 2026-05-24 17:56:05 +00:00
Owner

Summary

  • Add .golangci.yml enabling errcheck, staticcheck, govet, gosec, ineffassign, unused
  • Fix all 66 lint issues across 16 files (unchecked errors, HTTP status constants, deprecated APIs, dead code)
  • Add .gitea/workflows/ci.yml — runs go vet, go test -race, and golangci-lint on push/PR

Test plan

  • golangci-lint run ./... — 0 issues
  • go test ./... — all pass
  • Gitea Actions CI runs green on this PR
## Summary - Add `.golangci.yml` enabling errcheck, staticcheck, govet, gosec, ineffassign, unused - Fix all 66 lint issues across 16 files (unchecked errors, HTTP status constants, deprecated APIs, dead code) - Add `.gitea/workflows/ci.yml` — runs `go vet`, `go test -race`, and `golangci-lint` on push/PR ## Test plan - [x] `golangci-lint run ./...` — 0 issues - [x] `go test ./...` — all pass - [x] Gitea Actions CI runs green on this PR
lerko added 2 commits 2026-05-24 02:02:35 +00:00
Add .golangci.yml enabling errcheck, staticcheck, govet, gosec,
ineffassign, and unused linters. Fix 66 issues across 16 files:
- Check all unchecked errors (errcheck)
- Use HTTP status constants instead of numeric literals (staticcheck)
- Replace deprecated LineUp/LineDown with ScrollUp/ScrollDown (staticcheck)
- Convert sprintf+write patterns to fmt.Fprintf (staticcheck)
- Add ReadHeaderTimeout to http.Server (gosec)
- Remove unused types and functions (unused)
- Add nolint comments for intentional patterns (InsecureSkipVerify,
  math/rand for jitter, dialect-only SQL formatting)
ci: add Gitea Actions pipeline for test and lint
CI / test (pull_request) Failing after 9s
CI / lint (pull_request) Failing after 56s
fb3f96f608
Runs on push to main and on pull requests. Two parallel jobs:
- test: go vet + go test -race
- lint: golangci-lint via official action
lerko added 1 commit 2026-05-24 16:42:51 +00:00
fix(ci): use sh instead of bash for runner compatibility
CI / test (pull_request) Failing after 46s
CI / lint (pull_request) Failing after 20s
6d7ecc46eb
lerko added 1 commit 2026-05-24 16:45:30 +00:00
fix(ci): enable CGO for race detector, use lint-action v7
CI / test (pull_request) Failing after 1m27s
CI / lint (pull_request) Successful in 1m37s
5915e0ebe3
lerko added 1 commit 2026-05-24 16:49:24 +00:00
fix(ci): install gcc for race detector support
CI / test (pull_request) Successful in 4m41s
CI / lint (pull_request) Successful in 1m17s
26268bb6ef
lerko merged commit cc8d76fdbc into main 2026-05-24 17:56:05 +00:00
lerko deleted branch chore/linter-ci-pipeline 2026-05-24 17:56:05 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: lerkolabs/uptop#20