ci: lint the example module - #162
Closed
tthayer wants to merge 1 commit into
Closed
Conversation
example/ is a separate Go module, so the root golangci-lint invocation never reached it -- it held 27 findings while carrying every integration test in the repo, including the only coverage of the partitioned-parent ALTER suppression. gomoddirectives is excluded for example/go.mod alone: the module consumes the in-repo library through a local replace, which is required and cannot be expressed via replace-allow-list (that setting governs non-local replacements only). Scoping it to the file keeps the check live for the root go.mod. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
tthayer
marked this pull request as ready for review
July 31, 2026 22:15
tthayer
marked this pull request as draft
July 31, 2026 22:16
Contributor
Author
|
Closing unmerged: linting |
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.
What
Adds
example/to thego-lintCI job and fixes the 27 findings that were hiding there.example/is a separate Go module, so the rootgolangci-lintinvocation never reached it — despite it carrying every integration test in the repo, including the only coverage of the partitioned-parentALTERsuppression (SQLSTATE 42809) added in #159/#160.Findings fixed (27 → 0)
--fix(whitespace, godot)var-naming:fakeTenantIds→fakeTenantIDs,masterSelectSql→masterSelectSQL,fmtSql→fmtSQL,selectSql→selectSQL,eventIds→eventIDsfmt.Println()strconv.ParseInt(s, 2, 64)→ParseUint(s, 2, 8)inbitStringToBytes, so thebyte()conversion is structurally bounded rather than merely bounded in practiceline-length-limit: hoisted a 201-char query intoconst updatedPetQueryThe one config carve-out
gomoddirectivesflagsexample/go.mod'sreplace github.com/ductone/protoc-gen-pgdb => ../, which is how the example module consumes the in-repo library and must stay.Note this is not expressible via the existing
replace-allow-listsetting — that governs non-local replacements only, and the firing check here is the separatereplace-localboolean. Rather than flipreplace-local: true(which would disable the check for the rootgo.modtoo), the exclusion is scoped to the single file.Verified scoped, not blanket: with a local
replacetemporarily added to the rootgo.mod,gomoddirectivesstill fires on it.Verification
golangci-lint runclean in both modulesgo test ./...passes in both modules (example/integration tests against PG16 + pgvector)Closes IGA-3723.
🤖 Generated with Claude Code