Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: CI

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main" ]
branches: ["main"]

jobs:
tests:
Expand All @@ -16,12 +16,12 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.26.x'
go-version: "1.26.x"

- name: Lint
uses: golangci/golangci-lint-action@v8
with:
version: v2.11.3
version: v2.12

- name: Test
run: go test -race -covermode atomic -coverprofile=coverage.txt -v ./...
Expand Down
43 changes: 8 additions & 35 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,22 @@ linters:
- errname
- fatcontext
- forcetypeassert
- gochecknoinits
- goconst
- godox
- gosec
- govet
- ineffassign
- interfacebloat
- musttag
- makezero
- modernize
- nilerr
- nilnil
- noctx
- nolintlint
- prealloc
- predeclared
- recvcheck
- revive
- sloglint
- staticcheck # stylecheck, gosimple, and staticcheck has been merged inside the staticcheck
- staticcheck
- thelper
- tparallel
- unconvert
Expand All @@ -43,19 +42,10 @@ linters:
goconst:
min-len: 3
min-occurrences: 3
godox:
keywords:
- TODO
- BUG
- FIXME
- OPTIMIZE
- HACK
interfacebloat:
max: 5
ignore-tests: true
nolintlint:
require-explanation: false
require-explanation: true
require-specific: true
allow-unused: false
revive:
max-open-files: 2048
confidence: 0.8
Expand All @@ -78,26 +68,15 @@ linters:
severity: warning
disabled: false
usetesting:
os-mkdir-temp: true
os-setenv: true
os-temp-dir: true
os-create-temp: true
context-background: true
context-todo: true
exclusions:
generated: lax
rules:
- linters:
- containedctx
- goconst
path: (.+)_test\.go

- linters:
- revive
path: synthesize/voice.go
text: "exported const .* should have comment"
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- gci
Expand All @@ -111,9 +90,3 @@ formatters:
- default
- prefix(github.com/occamist/laverna)
custom-order: true
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
2 changes: 1 addition & 1 deletion synthesize/runner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func TestBatchRunner(t *testing.T) {
saveFn func(string, []byte) error
wantErr error
wantAudios []string
ctx context.Context
ctx context.Context //nolint:containedctx // one test requires a cancelled context
}{
{
name: "successful batch run",
Expand Down
2 changes: 1 addition & 1 deletion synthesize/voice_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func TestRun_AllVoices(t *testing.T) {
opt Opt
wantErr error
}
var tests []Test
tests := make([]Test, 0, len(testVoices))

for _, voice := range testVoices {
opt := Opt{
Expand Down
Loading