Skip to content

Commit bc154d6

Browse files
authored
Merge pull request #5 from cybozu/update-dependency
2 parents 5a126c2 + a2a50f8 commit bc154d6

6 files changed

Lines changed: 18 additions & 19 deletions

File tree

.github/workflows/lint_and_tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ on:
55
push:
66

77
env:
8-
go-version: 1.18
8+
go-version: 1.24
99

1010
jobs:
1111
unit-test:
1212
timeout-minutes: 20
13-
runs-on: ubuntu-20.04
13+
runs-on: ubuntu-24.04
1414
steps:
15-
- uses: actions/checkout@v3
15+
- uses: actions/checkout@v4
1616

17-
- uses: actions/setup-go@v3
17+
- uses: actions/setup-go@v5
1818
with:
1919
go-version: ${{ env.go-version }}
2020

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
GIT := git
22
PRE_COMMIT := pre-commit
33

4-
JSONNET_VERSION := v0.18.0
5-
GOLANGCI_VERSION := v1.46.2
4+
JSONNET_VERSION := v0.20.0
5+
GOLANGCI_VERSION := v1.64.6
66

77
VERSION := v0.3.0
88

go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
module github.com/cybozu/pre-commit-jsonnet
22

3-
go 1.18
3+
go 1.24
44

55
require golang.org/x/exp v0.0.0-20220428152302-39d4317da171
66

7-
require github.com/sergi/go-diff v1.2.0
7+
require github.com/sergi/go-diff v1.3.1
88

9-
require golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6
9+
require golang.org/x/sys v0.31.0

go.sum

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
66
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
77
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
88
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
9-
github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ=
10-
github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
9+
github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8=
10+
github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I=
1111
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
1212
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
1313
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
1414
golang.org/x/exp v0.0.0-20220428152302-39d4317da171 h1:TfdoLivD44QwvssI9Sv1xwa5DcL5XQr4au4sZ2F2NV4=
1515
golang.org/x/exp v0.0.0-20220428152302-39d4317da171/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE=
16-
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6 h1:nonptSpoQ4vQjyraW20DXPAglgQfVnM9ZC6MmNLMR60=
17-
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
16+
golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik=
17+
golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
1818
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
1919
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
2020
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
21-
gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I=
22-
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
21+
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
22+
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=

hooks/jsonnet-fmt-hook/main.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ import (
88
"regexp"
99
"strings"
1010

11-
"io/ioutil"
12-
1311
"golang.org/x/sys/execabs"
1412

1513
"github.com/cybozu/pre-commit-jsonnet/lib"
@@ -157,7 +155,7 @@ func diffJsonnetFmt(f string) (*FileDiff, error) {
157155
return nil, fmtError
158156
}
159157

160-
b, err := ioutil.ReadFile(f)
158+
b, err := os.ReadFile(f)
161159
if err != nil {
162160
return nil, err
163161
}

hooks/jsonnet-lint-hook/main_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ func TestExecJsonnetLint(t *testing.T) {
5252
continue
5353
}
5454

55-
if !errors.As(err, &param.wantErr) {
55+
var lintErr *LintError
56+
if !errors.As(err, &lintErr) {
5657
t.Errorf("args='%q %q', want=%q, got=%q", param.f, param.opts, param.wantErr, err)
5758
}
5859
}

0 commit comments

Comments
 (0)