You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE] Enforce Go import order with gci in golangci-lint #222
Go import grouping is only enforced in inference-gateway/cli, which runs the gci formatter under golangci-lint v2 with a fixed section order (standard, testify, mocks, default, github.com/inference-gateway/, own module). Every other core Go repo lacks that check, so import blocks drift between files and PRs and reviewers end up nitpicking by hand.
Current state in this repo: .golangci.yml exists (v2) and enables gofmt + goimports formatters, but not gci, so there is no enforced grouping between third-party, k8s, github.com/inference-gateway/*, and internal imports. CI runs golangci-lint v2.12.2.
Reference config (.golangci.yml in inference-gateway/cli):
Adjust the sections to what this repo actually imports (drop testify if unused, add a mocks prefix if there is one). goimports alone is not enough: it only separates stdlib from everything else and does not enforce a stable order for the internal/org groups.
Acceptance Criteria
.golangci.yml (v2 schema) enables the gci formatter with custom-order: true and sections matching the CLI layout above, adapted to this module path
CI runs golangci-lint run on every PR and fails when imports are not grouped/ordered as configured
Existing Go files are reformatted once (golangci-lint fmt) so main is green after the check lands
CONTRIBUTING.md / AGENTS.md mentions the import order and how to fix it locally (golangci-lint fmt)
Activity
inference-gateway-releaser commentedon Sep 24, 2026
🎉 This issue has been resolved in version 0.25.1 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀