golangci-lint v2#144
Merged
jy-tan merged 7 commits intoUse-Tusk:mainfrom Apr 27, 2026
Merged
Conversation
During testing, we found the linting setup was broken in multiple ways. The Makefile said v1, shell.nix had v2, .golangci.yml was written for v1, and things just wouldn't install properly. This commit fixes all of that by picking v2.11.4 as our version, updating all configs to match, and making Makefile the single source of truth. Problems we found: - Makefile documented v1 but was trying to use v2 import path - shell.nix installed v2, conflicting with Makefile's old command - .golangci.yml was v1 syntax, incompatible with v2 - Different versions in local dev vs CI made things unreproducible What we fixed: - Pinned golangci-lint to v2.11.4 in Makefile - Rewrote .golangci.yml for v2 format - Removed tools from shell.nix (rely on Makefile instead) - Updated GitHub Actions to use make install-lint-tools Signed-off-by: Dominik Tomasi <dominik.tomasi@gmail.com>
Now that the linter is working, v2 has stricter rules than v1. This commit applies those rules across the codebase. Main changes: - Add #nosec annotations where we've validated inputs (network ops, file I/O) - Fix import formatting (blank lines between stdlib and internal imports) - Lowercase some error message strings for consistency This is all mechanical/policy stuff - no logic changes. Signed-off-by: Dominik Tomasi <dominik.tomasi@gmail.com>
Linting changes in d9f9122 broke cd command detection logic. Commands like 'cd ../repo' were incorrectly rejected.
Targets that don't produce files with their name should be declared as .PHONY to prevent make from skipping them if files with those names exist.
Simplifies the boolean condition in isPureCDCommand to address golangci-lint v2 staticcheck QF1001 suggestion.
Closed
jy-tan
requested changes
Apr 27, 2026
Contributor
jy-tan
left a comment
There was a problem hiding this comment.
Can you fix the Linux lint errors too, thank you!
Linux-specific gosec G115, G704, staticcheck ST1005, and gofumpt issues were invisible to darwin users. Updated Makefile lint-all target to catch cross-platform issues during development. Fixed remaining linux related linting errors.
There was a problem hiding this comment.
1 issue found across 7 files (changes from recent commits).
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="Makefile">
<violation number="1" location="Makefile:88">
P1: `lint-all` can hide failing lint runs because all platforms are executed in one semicolon-chained shell command, so an early failure can be overwritten by a later success.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.
adds set -e; to loop in makefile Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
jy-tan
approved these changes
Apr 27, 2026
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.
Fix golangci-lint tooling versioning and v2 compliance
As you requested in our discussion, I've separated out the golangci-lint updates. During testing, I found the linting setup was broken in multiple ways.
What was wrong
The Makefile said v1, shell.nix had v2, .golangci.yml was written for v1, and things just wouldn't install properly. Different versions in local dev vs CI made things unreproducible.
What I fixed
Now everything builds consistently and linting works consistently across environments. All tests pass and there are no functional changes to the actual application code.