Conversation
…serrcheck, noctx, wastedassign, intrange, wrapcheck, musttag Enable 7 new golangci-lint linters and add govulncheck as a pre-commit hook and CI job with exclude-list filtering. golangci-lint linters: - testifylint: enforce require for error assertions, prefer assert.Empty/Len/Positive - rowserrcheck: check sql.Rows.Err() is checked - noctx: enforce context-aware HTTP and exec calls - wastedassign: detect dead assignments - intrange: use range-over-int syntax - wrapcheck: enforce error wrapping at package boundaries - musttag: enforce struct tags where needed govulncheck: - Wrapper filters JSON output against .govulncheck-exclude for vuln IDs with no upstream fix (all 9 currently in ollama/ollama) - Runs as pre-commit hook (on go.mod/go.sum changes) and CI job - Uses symbol-level analysis to only flag vulns with actual call traces Also adds gosec G204/G704 exclusion for test files and fixes all existing violations across ~55 files. closes #596 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #599 +/- ##
==========================================
- Coverage 76.13% 76.09% -0.05%
==========================================
Files 63 63
Lines 18579 18614 +35
==========================================
+ Hits 14145 14164 +19
- Misses 3758 3774 +16
Partials 676 676 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
cpcloud
added a commit
that referenced
this pull request
Mar 19, 2026
…serrcheck, noctx, wastedassign, intrange, wrapcheck, musttag (#599) ## Summary - Enable 7 new golangci-lint linters: testifylint, rowserrcheck, noctx, wastedassign, intrange, wrapcheck, musttag - Add govulncheck as pre-commit hook and CI job with `.govulncheck-exclude` for filtering vuln IDs with no upstream fix - Add gosec G204/G704 exclusion for test files (controlled test binary paths, not user input) - Fix all existing violations across ~55 files closes #596 Co-authored-by: Claude Opus 4.6 <noreply@anthropic.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.
Summary
.govulncheck-excludefor filtering vuln IDs with no upstream fixcloses #596