Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ci/lint/README-golangci-lint.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ The script reads the Go version from `go.mod` and selects the correct golangci-l

| Go Version | golangci-lint Version | Config File |
|------------|----------------------|-------------|
| Go 1.24+ | v2.8.0 | `golangci-v2.yml` |
| Go 1.26+ | v2.12.2 | `golangci-v2.yml` |
| Go 1.24-1.25 | v2.8.0 | `golangci-v2.yml` |
| Go 1.23 | v2.3.1 | `golangci-v2.yml` |

---
Expand Down
6 changes: 5 additions & 1 deletion ci/lint/install-golangci-lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ fi
# Reference: https://github.com/golangci/golangci-lint/issues/5032
#
# Compatibility table (all projects require Go 1.23+):
# Go 1.26+ -> golangci-lint v2.12.2 (built with Go 1.26.2)
# Go 1.24+ -> golangci-lint v2.8.0
# Go 1.23 -> golangci-lint v2.3.1 (last v2 supporting Go 1.23)
###############################################################################
Expand Down Expand Up @@ -79,7 +80,10 @@ select_compatible_version() {

# Select compatible version based on Go version
# All projects require Go 1.23+
if [[ "${go_ver_num}" -ge 124 ]]; then
if [[ "${go_ver_num}" -ge 126 ]]; then
# v2.12.2 is built with Go 1.26.2 and supports Go 1.26+
echo "v2.12.2"
elif [[ "${go_ver_num}" -ge 124 ]]; then
echo "v2.8.0"
elif [[ "${go_ver_num}" -ge 123 ]]; then
# v2.3.1 is the last v2 release supporting Go 1.23
Expand Down
5 changes: 4 additions & 1 deletion ci/lint/run-lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,11 @@ detect_versions() {

# Determine golangci-lint version based on Go version
# All projects require Go 1.23+, always use golangci-lint v2
# v2.12.2+ built with Go 1.26.2, supports Go 1.26+
# v2.4.0+ requires Go 1.24+, v2.3.1 is the last v2 supporting Go 1.23
if (( major == 1 && minor >= 24 )) || (( major > 1 )); then
if (( major == 1 && minor >= 26 )) || (( major > 1 )); then
LINT_VERSION="v2.12.2"
elif (( major == 1 && minor >= 24 )); then
LINT_VERSION="v2.8.0"
elif (( major == 1 && minor == 23 )); then
LINT_VERSION="v2.3.1"
Expand Down
Loading