Upgrade to Go 1.26, golangci-lint v2.10, and update dependencies - #24
Merged
Conversation
- go.mod: Go 1.25 -> 1.26
- Makefile: golangci-lint v2.4.0 -> v2.10.1
- GitHub Actions: checkout v5 -> v6, setup-go v5 -> v6,
golangci-lint-action v8 -> v9
- go get -u ./... and go mod tidy to update all dependencies
- go fix ./...: SplitSeq iterators, slices.Contains, remove
unnecessary loop variable copies, interface{} -> any
- Fix new lint issues from golangci-lint v2.10:
- QF1012: WriteString(Sprintf(...)) -> Fprintf
- G703/G705/G115/G101: suppress false positives for CLI tools
and test fixtures
- CLAUDE.md: update Go version idioms to 1.26+
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR upgrades the repository’s Go toolchain and CI/linting stack, then applies automated modernizations and dependency updates to keep the codebase aligned with Go 1.26-era idioms and the newer golangci-lint ruleset.
Changes:
- Bump Go version to 1.26, refresh dependencies (
go.mod/go.sum), and update cached expressions (expr.cache). - Upgrade CI and lint tooling (GitHub Actions versions, golangci-lint version) and adjust Makefile guidance.
- Apply
go fix/modernization changes (e.g.,any,slices.Contains,strings.SplitSeq, removal of unnecessary loop-var capture) and add targeted//nolint:gosecsuppressions for CLI/test cases.
Reviewed changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/searchfs/fs_test.go | Minor string builder formatting modernization in test helper. |
| pkg/rules/yaml.go | Update YAML unmarshaler signature to use any. |
| pkg/rules/analyze.go | Remove unnecessary loop variable capture under newer Go range semantics. |
| pkg/digest/redact_secrets_test.go | Add gosec suppressions for intentionally fake secrets in tests. |
| pkg/digest/files.go | Use slices.Contains for null-byte detection in text/binary heuristic. |
| pkg/dep/js.go | Switch to strings.SplitSeq iterator-based splitting. |
| cmd/whatsun/terminal.go | Add gosec suppression for Fd() int conversion rationale. |
| cmd/warm_cache/main.go | Add gosec suppression for CLI stderr output. |
| cmd/validate/main.go | Add gosec suppression for CLI stderr output. |
| cmd/gen_docs/main.go | Add filepath.Clean on output path, switch to fmt.Fprintf patterns, and add gosec suppressions for CLI output/path. |
| Makefile | Bump golangci-lint version and update Go 1.26 jsonv2 note/link. |
| AGENTS.md | Update documented required Go idioms baseline to Go 1.26+. |
| .github/workflows/tests.yml | Update actions versions and Go version used in CI tests. |
| .github/workflows/golangci-lint.yml | Update actions versions and golangci-lint-action + linter version. |
| go.mod | Set go 1.26 and update direct/indirect module requirements. |
| go.sum | Refresh module checksums after dependency updates. |
| expr.cache | Refresh generated cache content corresponding to updated deps/toolchain. |
The modernize linter covers the same analyzers as `go fix` (any, stringsseq, slicescontains, forvar, etc.), so it catches regressions in CI without needing a separate `go fix -diff` lint step. See: golangci/golangci-lint#6291 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@pjcdawkins The test regarding this one is still there: // Detected without having a package manager.
"configured-app/.platform.app.yaml": &fstest.MapFile{Data: []byte("name: app")},Do we need this anymore? |
ganeshdipdumbare
approved these changes
Mar 3, 2026
Contributor
Author
we will be reworking that in #23 so I'll leave that for now |
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
go get -u ./...go fix ./...modernizers:SplitSeqiterators,slices.Contains, remove unnecessary loop variable copies,interface{}->anyTest plan
make testpassesmake lintpasses (0 issues)make buildsucceeds🤖 Generated with Claude Code