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
6 changes: 3 additions & 3 deletions .github/workflows/tests-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
name: Verify Linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6

- name: Set up Go
uses: actions/setup-go@v6
Expand All @@ -17,7 +17,7 @@ jobs:

- name: Set up golangci-lint
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/v1.64.8/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.64.8
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/v2.6.2/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.6.2

- name: Run lint check
run: make lint
Expand All @@ -43,7 +43,7 @@ jobs:
- '1.19'
- '1.18'
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6

- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v6
Expand Down
47 changes: 47 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
version: 2

linters:
enable:
- asasalint
- asciicheck
- bidichk
- contextcheck
- decorder
- durationcheck
- errcheck
- errorlint
- exptostd
- fatcontext
- gocheckcompilerdirectives
- gochecksumtype
- goconst
- godoclint
- gosmopolitan
- grouper
- iface
- importas
- mirror
- misspell
- musttag
- perfsprint
- prealloc
- reassign
- recvcheck
- sloglint
- testifylint
- thelper
- unconvert
- wastedassign
- whitespace
settings:
goconst:
min-len: 4
min-occurrences: 4

formatters:
enable:
- gofmt
- goimports

run:
timeout: 600s
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ bench:
go test --benchmem -benchtime=10s -bench='Benchmark.*' -run='^$$'

lint:
golangci-lint run --timeout=600s --enable=asasalint,asciicheck,bidichk,containedctx,contextcheck,decorder,durationcheck,errorlint,exptostd,fatcontext,forbidigo,gocheckcompilerdirectives,gochecksumtype,goconst,gofmt,goimports,gosmopolitan,grouper,iface,importas,mirror,misspell,nilerr,nilnil,perfsprint,prealloc,reassign,recvcheck,sloglint,testifylint,unconvert,wastedassign,whitespace && go vet ./...
golangci-lint run --timeout=600s && go vet ./...

2 changes: 1 addition & 1 deletion slices_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3647,7 +3647,7 @@ func TestSlicePrepend(t *testing.T) {
result := SlicePrepend(tt.elem, tt.slices...)
assert.Equal(t, tt.expected, result)
// Verify exact allocation size
assert.Equal(t, len(tt.expected), len(result))
assert.Len(t, result, len(tt.expected))
assert.Equal(t, len(tt.expected), cap(result))
})
}
Expand Down