File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414 - name : Set up Go
1515 uses : actions/setup-go@v5
1616 with :
17- go-version : ' 1.23.2 '
17+ go-version : ' 1.24.1 '
1818 id : go
1919
2020 - name : Check out code into the Go module directory
Original file line number Diff line number Diff line change 11{
2+ "formatters" : {
3+ "enable" : [
4+ " gci" ,
5+ " gofmt" ,
6+ " gofumpt" ,
7+ " goimports"
8+ ],
9+ "exclusions" : {
10+ "generated" : " lax" ,
11+ "paths" : [
12+ " third_party$" ,
13+ " builtin$" ,
14+ " examples$"
15+ ]
16+ },
17+ "settings" : {
18+ "goimports" : {
19+ "local-prefixes" : [
20+ " github.com/hedhyw/rex/"
21+ ]
22+ }
23+ }
24+ },
225 "linters" : {
3- "enable-all " : true ,
26+ "default " : " all " ,
427 "disable" : [
5- " nonamedreturns" ,
6- " wrapcheck" ,
7- " varnamelen" ,
8- " thelper" ,
9- " paralleltest" ,
10- " ireturn" ,
11- " gomnd" ,
12- " nolintlint" ,
28+ " copyloopvar" ,
1329 " depguard" ,
1430 " goconst" ,
15- " exportloopref" ,
16- " mnd" ,
17- " copyloopvar" ,
18- " execinquery" ,
1931 " govet" ,
20- " intrange"
21- ]
32+ " intrange" ,
33+ " ireturn" ,
34+ " mnd" ,
35+ " nolintlint" ,
36+ " nonamedreturns" ,
37+ " paralleltest" ,
38+ " thelper" ,
39+ " varnamelen" ,
40+ " wrapcheck"
41+ ],
42+ "exclusions" : {
43+ "generated" : " lax" ,
44+ "paths" : [
45+ " third_party$" ,
46+ " builtin$" ,
47+ " examples$"
48+ ],
49+ "presets" : [
50+ " comments" ,
51+ " common-false-positives" ,
52+ " legacy" ,
53+ " std-error-handling"
54+ ]
55+ }
2256 },
23- "linters-settings" : {
24- "goimports" : {
25- "local-prefixes" : " github.com/hedhyw/rex/"
26- },
27- "revive" : {}
28- }
29- }
57+ "version" : " 2"
58+ }
Original file line number Diff line number Diff line change 1- GOLANG_CI_LINT_VER: =v1.61.0
1+ GOLANG_CI_LINT_VER: =v2.0.2
22COVER_PACKAGES =${shell go list ./... | grep -Ev 'test|cmd' | tr '\n' ','}
33
44all : lint test
Original file line number Diff line number Diff line change 1- // nolint: goerr113 // Test error.
21package helper_test
32
43import (
@@ -117,6 +116,7 @@ func TestProcessTokensFailed(t *testing.T) {
117116
118117 _ , err := helper .ProcessTokens (sb , []dialect.Token {
119118 helper .TokenFunc (func (dialect.StringByteWriter ) (int , error ) {
119+ // nolint: err113 // Test.
120120 return 0 , errors .New ("failed" )
121121 }),
122122 })
Original file line number Diff line number Diff line change @@ -175,6 +175,7 @@ func TestRexChars_runes(t *testing.T) {
175175 }, {
176176 Name : "unicode" ,
177177 Chain : []dialect.Token {
178+ // nolint: gosmopolitan // A test.
178179 base .Chars .Runes ("ひヒ家" ),
179180 },
180181 Expected : `[\x{3072}\x{30D2}\x{5BB6}]` ,
Original file line number Diff line number Diff line change 1- // nolint: lll,nosnakecase // Generated regular expression can be long.
1+ // nolint: lll // Generated regular expression can be long.
22package rex_test
33
44import (
@@ -183,6 +183,7 @@ func Example_unicodeByName() {
183183
184184 fmt .Println ("Hiragana: ひ" , re .MatchString ("ひ" ))
185185 fmt .Println ("Katakana: ヒ" , re .MatchString ("ひ" ))
186+ // nolint: gosmopolitan // A test.
186187 fmt .Println ("Kanji: 家" , re .MatchString ("家" ))
187188 fmt .Println ("Other: a" , re .MatchString ("a" ))
188189 // Output:
You can’t perform that action at this time.
0 commit comments