File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33on :
44 push :
5- branches : [ "main" ]
5+ branches : ["main"]
66 pull_request :
7- branches : [ "main" ]
7+ branches : ["main"]
88
99jobs :
1010 tests :
@@ -16,12 +16,12 @@ jobs:
1616 - name : Setup Go
1717 uses : actions/setup-go@v5
1818 with :
19- go-version : ' 1.26.x'
19+ go-version : " 1.26.x"
2020
2121 - name : Lint
2222 uses : golangci/golangci-lint-action@v8
2323 with :
24- version : v2.11.3
24+ version : v2.12
2525
2626 - name : Test
2727 run : go test -race -covermode atomic -coverprofile=coverage.txt -v ./...
Original file line number Diff line number Diff line change @@ -13,23 +13,22 @@ linters:
1313 - errname
1414 - fatcontext
1515 - forcetypeassert
16- - gochecknoinits
1716 - goconst
18- - godox
1917 - gosec
2018 - govet
2119 - ineffassign
22- - interfacebloat
23- - musttag
20+ - makezero
21+ - modernize
2422 - nilerr
2523 - nilnil
2624 - noctx
2725 - nolintlint
26+ - prealloc
2827 - predeclared
2928 - recvcheck
3029 - revive
3130 - sloglint
32- - staticcheck # stylecheck, gosimple, and staticcheck has been merged inside the staticcheck
31+ - staticcheck
3332 - thelper
3433 - tparallel
3534 - unconvert
@@ -43,19 +42,10 @@ linters:
4342 goconst :
4443 min-len : 3
4544 min-occurrences : 3
46- godox :
47- keywords :
48- - TODO
49- - BUG
50- - FIXME
51- - OPTIMIZE
52- - HACK
53- interfacebloat :
54- max : 5
45+ ignore-tests : true
5546 nolintlint :
56- require-explanation : false
47+ require-explanation : true
5748 require-specific : true
58- allow-unused : false
5949 revive :
6050 max-open-files : 2048
6151 confidence : 0.8
@@ -78,26 +68,15 @@ linters:
7868 severity : warning
7969 disabled : false
8070 usetesting :
81- os-mkdir-temp : true
82- os-setenv : true
83- os-temp-dir : true
84- os-create-temp : true
71+ context-background : true
72+ context-todo : true
8573 exclusions :
8674 generated : lax
8775 rules :
88- - linters :
89- - containedctx
90- - goconst
91- path : (.+)_test\.go
92-
9376 - linters :
9477 - revive
9578 path : synthesize/voice.go
9679 text : " exported const .* should have comment"
97- paths :
98- - third_party$
99- - builtin$
100- - examples$
10180formatters :
10281 enable :
10382 - gci
@@ -111,9 +90,3 @@ formatters:
11190 - default
11291 - prefix(github.com/occamist/laverna)
11392 custom-order : true
114- exclusions :
115- generated : lax
116- paths :
117- - third_party$
118- - builtin$
119- - examples$
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ func TestBatchRunner(t *testing.T) {
2323 saveFn func (string , []byte ) error
2424 wantErr error
2525 wantAudios []string
26- ctx context.Context
26+ ctx context.Context //nolint:containedctx // one test requires a cancelled context
2727 }{
2828 {
2929 name : "successful batch run" ,
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ func TestRun_AllVoices(t *testing.T) {
8585 opt Opt
8686 wantErr error
8787 }
88- var tests []Test
88+ tests := make ( []Test , 0 , len ( testVoices ))
8989
9090 for _ , voice := range testVoices {
9191 opt := Opt {
You can’t perform that action at this time.
0 commit comments