Skip to content

Commit

Permalink
feat: bump to build with go1.24 (#2239)
Browse files Browse the repository at this point in the history
* feat: bump to build with go1.24

Signed-off-by: Rui Chen <[email protected]>

* chore: golangci-lint 1.64.4

Signed-off-by: Rui Chen <[email protected]>

* fix: ensure constant format strings in fmt and printf calls

Signed-off-by: Rui Chen <[email protected]>

---------

Signed-off-by: Rui Chen <[email protected]>
  • Loading branch information
chenrui333 authored Feb 16, 2025
1 parent ac23b40 commit 0886382
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ jobs:
- name: Run linters
uses: golangci/golangci-lint-action@051d91933864810ecd5e2ea2cfd98f6a5bca5347 # v6.3.2
with:
version: v1.62.2
version: v1.64.4
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM golang:1.23-alpine3.21 AS builder
FROM --platform=$BUILDPLATFORM golang:1.24-alpine3.21 AS builder

ARG TARGETOS TARGETARCH

Expand Down
2 changes: 1 addition & 1 deletion docs/developer-guide/building.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Building TFLint

Go 1.23 or higher is required to build TFLint from source code. Clone the source code and run the `make` command. Built binary will be placed in `dist` directory.
Go 1.24 or higher is required to build TFLint from source code. Clone the source code and run the `make` command. Built binary will be placed in `dist` directory.

```console
$ git clone https://github.com/terraform-linters/tflint.git
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/terraform-linters/tflint

go 1.23
go 1.24.0

require (
github.com/agext/levenshtein v1.2.3
Expand Down
2 changes: 1 addition & 1 deletion terraform/addrs/parse_ref_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ func TestParseRef(t *testing.T) {
}

for _, problem := range deep.Equal(got, test.Want) {
t.Errorf(problem)
t.Errorf("%s", problem)
}
})
}
Expand Down
2 changes: 1 addition & 1 deletion terraform/lang/funcs/collection.go
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ var SumFunc = function.New(&function.Spec{
ty := args[0].Type()

if !ty.IsListType() && !ty.IsSetType() && !ty.IsTupleType() {
return cty.NilVal, function.NewArgErrorf(0, fmt.Sprintf("argument must be list, set, or tuple. Received %s", ty.FriendlyName()))
return cty.NilVal, function.NewArgErrorf(0, "argument must be list, set, or tuple. Received %s", ty.FriendlyName())
}

if !args[0].IsWhollyKnown() {
Expand Down
2 changes: 1 addition & 1 deletion terraform/lang/funcs/crypto.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ var RsaDecryptFunc = function.New(&function.Spec{
default:
errStr = fmt.Sprintf("invalid private key: %s", e)
}
return cty.UnknownVal(cty.String), function.NewArgErrorf(1, errStr)
return cty.UnknownVal(cty.String), function.NewArgErrorf(1, "%s", errStr)
}
privateKey, ok := rawKey.(*rsa.PrivateKey)
if !ok {
Expand Down

0 comments on commit 0886382

Please sign in to comment.