chore: add go-consistent code-pattern check#56
Merged
Conversation
Import the go-consistent consistency check from the structalign project: - Add a `consistent` task to Taskfile.yml running `go-consistent` over PKG_PATH_LIST, and wire it into the `ci` gate after `lint`. - Run the check in the GitHub Actions lint job (install task + go-consistent, then `task consistent`). - Fix the two issues it flagged in watch_internal_test.go: move the closing paren of multi-line assert calls to its own line with a trailing comma, matching the file's dominant arg-list style. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## devel #56 +/- ##
=======================================
Coverage 98.38% 98.38%
=======================================
Files 6 6
Lines 186 186
=======================================
Hits 183 183
Misses 2 2
Partials 1 1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Summary
Imports the
go-consistentcode-pattern consistency check from thestructalignproject and applies it here.Changes
consistenttask (go-consistent {{.PKG_PATH_LIST}}), wired into thecigate right afterlint..github/workflows/ci.yml): the lint job now installstask+go-consistentand runstask consistent.go-consistentflagged two multi-lineassertcalls inconsulvar/internal/driver/watch_internal_test.go— moved the closing)to its own line with a trailing comma to match the file's dominant arg-list style.Verification
task consistent→ exit 0go build ./...→ OKgo test ./consulvar/internal/driver/→ ok🤖 Generated with Claude Code