fix(lint): resolve 22+ Go linter errors across codebase#17
Merged
flexiondotorg merged 3 commits intomainfrom Mar 17, 2026
Merged
fix(lint): resolve 22+ Go linter errors across codebase#17flexiondotorg merged 3 commits intomainfrom
flexiondotorg merged 3 commits intomainfrom
Conversation
…er workflow - Replace separate build.yml and release.yml with unified builder.yml - Add actionlint problem matcher for GitHub Actions validation - Add golangci.yml configuration for code linting - Update direnv and Nix development shell configuration Signed-off-by: Martin Wimpress <code@wimpress.io>
- Fix whitespace, function naming, and type assertion errors in cmd/jivedrop - Correct unused variable and parameter issues in internal/encoder - Resolve linter issues in internal/id3 and internal/ui - Update .golangci.yml to enable modernize linter - Scope .gitignore jivedrop entry to repository root only Signed-off-by: Martin Wimpress <code@wimpress.io>
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
There was a problem hiding this comment.
5 issues found across 22 files
Confidence score: 4/5
- This PR looks safe to merge overall: the reported issues are mostly CI/test hardening and lint reliability concerns rather than clear runtime breakage in production code.
- The highest-risk item is in
.github/workflows/builder.yml: usinggolang/govulncheck-action@masteris mutable and can introduce unexpected or unreviewed behavior in the pipeline, so pinning to a release or SHA would reduce supply-chain and reproducibility risk. - Tooling drift issues (
@latestin.github/workflows/builder.yml, ANSI matcher limitations in.github/actionlint-matcher.json, and missinggocyclo -overinjustfile) can cause inconsistent checks or allow complexity regressions to slip through. - Pay close attention to
.github/workflows/builder.yml,.github/actionlint-matcher.json,justfile, andcmd/jivedrop/main_test.go- they affect CI determinism, annotation accuracy, lint enforcement, and path-validation correctness in tests.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="cmd/jivedrop/main_test.go">
<violation number="1" location="cmd/jivedrop/main_test.go:499">
P2: Use a path-aware containment check here. `strings.HasPrefix` also matches sibling directories with the same textual prefix, so this test can miss incorrect output paths.</violation>
</file>
<file name=".github/actionlint-matcher.json">
<violation number="1" location=".github/actionlint-matcher.json:7">
P2: Broaden the ANSI escape pattern here; `\x1b\[\d+m` misses standard multi-parameter SGR sequences, so colorised actionlint output can stop producing annotations.</violation>
</file>
<file name=".github/workflows/builder.yml">
<violation number="1" location=".github/workflows/builder.yml:35">
P2: Pin the CI-installed linter versions instead of using `@latest`, otherwise lint results can change underneath the repo.</violation>
<violation number="2" location=".github/workflows/builder.yml:132">
P1: Pin `golang/govulncheck-action` to a released version or commit SHA instead of the mutable `master` branch.</violation>
</file>
<file name="justfile">
<violation number="1" location="justfile:120">
P2: Add an `-over` threshold here; with only `-top` and `-avg`, `gocyclo` reports complexity but never fails the lint target on regressions.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
…alse positives Replace strings.HasPrefix check with filepath.Rel validation to ensure test properly detects when a path is actually contained within the target directory, preventing false positives when sibling directories share a textual prefix. Signed-off-by: Martin Wimpress <code@wimpress.io>
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
Resolves Go linter errors and enforces consistent code quality standards across the codebase. Adds comprehensive golangci-lint configuration to catch issues during development.
Changes
.golangci.ymlconfiguration for consistent linting.gitignoreto exclude linter cacheTesting