Skip to content

Conversation

@aka-bo
Copy link
Contributor

@aka-bo aka-bo commented Jan 9, 2026

To help us get this pull request reviewed and merged quickly, please be sure to include the following items:

  • Tests (if applicable)
  • Documentation (if applicable)
  • Changelog entry
  • A full explanation here in the PR description of the work done

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Tests
  • Other

Backward Compatibility

Is this change backward compatible with the most recently released version? Does it introduce changes which might change the user experience in any way? Does it alter the API in any way?

  • Yes (backward compatible)
  • No (breaking changes)

What's new?

Migrates from golangci-lint v1.64.2 to v2.8.0 to address Go version compatibility issues.

Changes

  • CI Workflows: Updated to [email protected] with v2.8.0 binary installation
  • Configurations: Migrated 5 .golangci.yml files to v2 format with version: "2" header
  • Lint Fixes: Resolved staticcheck issues in securememory and appencryption
  • Exclusions: Added targeted exclusions for false positives (prealloc, gosmopolitan, ST1012, noctx)
  • Build Scripts: Removed obsolete build/go/lint.sh and symlinks
  • Documentation: Updated CLAUDE.md with v2 binary installation instructions

aka-bo added 5 commits January 8, 2026 17:23
Updated GitHub Actions workflows to use golangci-lint-action v7.0.1 with
golangci-lint v2.8.0. Migrated all 5 .golangci.yml configuration files from
v1 to v2 format using the built-in migrate command. Updated CLAUDE.md with
binary installation instructions synced to CI version.

Changes:
- Workflows: Updated to [email protected] with v2.8.0
- Configs: Migrated 5 files to v2 format (version: "2" header added)
  - go/appencryption/.golangci.yml
  - go/securememory/.golangci.yml
  - server/go/.golangci.yml
  - samples/go/referenceapp/.golangci.yml
  - tests/cross-language/go/.golangci.yml
- Documentation: Updated with binary installation method
- Removed: install-mode parameter (binary is default in v7)

All configs validated successfully and local linting tested on key modules.
Simplified embedded field access in test file by removing explicit
secretInternal reference. Since secretInternal is embedded in secret,
its fields can be accessed directly.

Fixed:
- sec.secretInternal.bytes → sec.bytes (2 occurrences)

All golangci-lint checks now pass for securememory package.
Fixed:
- session_cache_test.go: Simplified embedded field access and optimized
  fmt.Fprintf usage (QF1008, QF1012)

Added exclusions:
- prealloc: Excluded for test files and memory.go (minimal benefit)
- gosmopolitan: Excluded for test files (intentional Unicode test data)
- ST1012: Excluded error naming convention (breaking API change for v2 plugin)

All golangci-lint checks now pass for appencryption package.
Removed build/go/lint.sh and all symlinks to it across Go modules. These
local lint scripts are no longer needed as linting is now handled directly
by the golangci-lint-action in CI workflows.
Excluded noctx linter warnings for main.go and database.go where context
is not meaningful:
- main.go:57 - net.Listen() during server startup (no request context)
- database.go:46 - DB.Exec() for session configuration during init

Both violations are in initialization/setup code where using context would
be ceremonial without providing actual cancellation/timeout benefits.

All golangci-lint checks now pass for server/go package.
@aka-bo aka-bo requested a review from sushantmimani January 9, 2026 18:31
@aka-bo aka-bo merged commit 5db95ee into main Jan 12, 2026
27 checks passed
@aka-bo aka-bo deleted the golangci-lint-v2-migration branch January 12, 2026 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants