Conversation
CI's golangci-lint flagged five issues after the config work: - run() exceeded funlen (55 > 50): extract flag parsing and config resolution into parseFlags, returning an opts struct. - TestResolutionOrder cognitive complexity 23 > 20: factor the repeated load-and-assert-path into a loadFromPath helper. - unused //nolint:gosec directive: the linter no longer flags that read. - os.Chdir in the test helper: use t.Chdir, which also restores the previous directory automatically. Verified against golangci-lint v2.9.0 (the version CI pins): 0 issues.
malpou
pushed a commit
that referenced
this pull request
Aug 1, 2026
🤖 I have created a release *beep* *boop* --- ## [0.1.2](v0.1.1...v0.1.2) (2026-08-01) ### Bug Fixes * satisfy the linter (funlen, gocognit, nolintlint, usetesting) ([#1](#1)) ([051c723](051c723)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: metsarelease[bot] <261965670+metsarelease[bot]@users.noreply.github.com>
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.
The initial-release CI run failed on five golangci-lint issues introduced by the config work. This fixes all of them, verified against the exact version CI pins (v2.9.0 → 0 issues).
run()exceededfunlen→ extracted flag parsing + config resolution intoparseFlags.TestResolutionOrdercognitive complexity → factored out aloadFromPathhelper.//nolint:gosec→ removed.os.Chdirin the test helper →t.Chdir(auto-restores).go build,go test ./..., andgolangci-lint run(v2.9.0) all green.