Repository navigation
chore(lint): enforce Go import grouping and named imports - #417
Merged
Merged
Conversation
Add a golangci-lint v2 config that enables the gci formatter with the shared section order adapted to this module (standard, testify, third-party, github.com/inference-gateway/, this module) and importas with a catch-all rule so every non-standard-library import is named after its last path element. No per-package pins are needed in this repo. Existing files were reformatted once; generated files stay untouched.
3 tasks done
inference-gateway-releaser Bot
added a commit
that referenced
this pull request
Sep 17, 2026
## [0.63.4](v0.63.3...v0.63.4) (2026-09-17) ### 🔧 Miscellaneous * **deps:** bump DeterminateSystems/nix-installer-action ([#419](#419)) ([ababe8f](ababe8f)) * **deps:** bump golang.org/x/term in the gomod group ([#418](#418)) ([9b7e179](9b7e179)) * **deps:** bump template pins from agent dependabot PRs ([#420](#420)) ([7d20ad4](7d20ad4)) * **deps:** bump template pins to latest ([#423](#423)) ([8b01295](8b01295)) * **lint:** enforce Go import grouping and named imports ([#417](#417)) ([c64fa23](c64fa23)) ### ✅ Miscellaneous * read template pins from vendor maps instead of hardcoding ([#421](#421)) ([a4eda21](a4eda21))
Contributor
|
🎉 This PR is included in version 0.63.4 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #416
Summary
Adds a golangci-lint v2 config that enforces the shared import layout from
inference-gateway/cli, adapted to this module, plus a naming rule so every non-standard-library import is explicitly aliased (same approach as inference-gateway/inference-gateway#667 and inference-gateway/sdk#182).Changes
.golangci.yml(new): enablegciwithcustom-order: trueand sectionsstandard,prefix(github.com/stretchr/testify),default,prefix(github.com/inference-gateway/)(coversinference-gateway/adk),prefix(github.com/inference-gateway/adl-cli).golangci.yml: enableimportaswithno-unaliased: trueand a catch-all regex that derives the alias from the last path element. This repo needs no per-package pins.golangci-lint fmt/golangci-lint run --fix); generated files (internal/schema/types.go,internal/templates/headers.go) stay untouched viagenerated: laxNotes
golangci-lint runon every PR, so the check is enforced with no workflow change.