File tree Expand file tree Collapse file tree 5 files changed +16
-5
lines changed
Expand file tree Collapse file tree 5 files changed +16
-5
lines changed Original file line number Diff line number Diff line change 4646 go-version : " 1.25.4" # update together with dev.dockerfile
4747 - run : make test-latest-deps
4848
49+ test22 :
50+ name : " test go 1.22"
51+ runs-on : ubuntu-latest
52+ steps :
53+ - uses : actions/checkout@v5
54+ - uses : actions/setup-go@v6
55+ with :
56+ go-version : " 1.22"
57+ - run : make test
58+
4959 lint :
5060 runs-on : ubuntu-latest
5161 steps :
5565 go-version : " 1.25.4" # update together with dev.dockerfile
5666 - uses : golangci/golangci-lint-action@v8
5767 with :
58- version : " v2.5.0 " # update together with dev.dockerfile
68+ version : " v2.6.1 " # update together with dev.dockerfile
5969
6070 lint-latest-deps :
6171 runs-on : ubuntu-latest
6777 - run : make apply-latest-deps
6878 - uses : golangci/golangci-lint-action@v8
6979 with :
70- version : " v2.5.0 " # update together with dev.dockerfile
80+ version : " v2.6.1 " # update together with dev.dockerfile
7181
7282 check-tidy :
7383 name : go mod tidy
Original file line number Diff line number Diff line change @@ -78,6 +78,7 @@ linters:
7878 - makezero # finds slice declarations with non-zero initial length
7979 - mirror # reports wrong mirror patterns of bytes/strings usage
8080 - mnd # detects magic numbers
81+ - modernize # suggests simplifications to Go code, using modern language and library features
8182 - musttag # enforces field tags in (un)marshaled structs
8283 - nakedret # finds naked returns in functions greater than a specified function length
8384 - nestif # reports deeply nested if statements
Original file line number Diff line number Diff line change 22FROM golang:1.25.4 AS go
33
44# update together with .github/workflows/ci.yml
5- FROM golangci/golangci-lint:v2.5.0 AS linter
5+ FROM golangci/golangci-lint:v2.6.1 AS linter
66
77FROM go AS dev
88ENV INSIDE_DEV_CONTAINER=1
Original file line number Diff line number Diff line change 11module github.com/maratori/testableexamples
22
3- go 1.22.0 // minimal supported version 1.18 , tested all versions up to 1.24
3+ go 1.22.0 // minimal supported version 1.22 , tested all versions up to 1.25
44
55require golang.org/x/tools v0.26.0
66
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ func NewAnalyzer() *analysis.Analyzer {
1313 return & analysis.Analyzer {
1414 Name : "testableexamples" ,
1515 Doc : "linter checks if examples are testable (have an expected output)" ,
16- Run : func (pass * analysis.Pass ) (interface {} , error ) {
16+ Run : func (pass * analysis.Pass ) (any , error ) {
1717 testFiles := make ([]* ast.File , 0 , len (pass .Files ))
1818 for _ , file := range pass .Files {
1919 fileName := pass .Fset .File (file .Pos ()).Name ()
You can’t perform that action at this time.
0 commit comments