Skip to content

Commit 8c439ea

Browse files
authored
Merge pull request #6 from cdzombak/devin/1749519788-update-golangci-lint
Update golangci-lint to v2.1.6 and fix linting errors
2 parents 195a90d + e59f645 commit 8c439ea

3 files changed

Lines changed: 15 additions & 3 deletions

File tree

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ jobs:
2121
check-latest: true
2222
- run: go version
2323
- name: golangci-lint
24-
uses: golangci/golangci-lint-action@v6
24+
uses: golangci/golangci-lint-action@v7
2525
with:
26-
version: 'v1.63'
26+
version: 'v2.1.6'
2727

2828
govet:
2929
name: go vet

.golangci.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
version: "2"
3+
4+
linters:
5+
enable:
6+
- govet
7+
settings:
8+
staticcheck:
9+
checks: ["all", "-QF1005", "-ST1000"]
10+
11+
run:
12+
timeout: 5m

comp.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func IntCompare(a, b int) int {
3030
}
3131

3232
func Float64Equal(a, b, tolerance float64) bool {
33-
return 0 == Float64Compare(a, b, tolerance)
33+
return Float64Compare(a, b, tolerance) == 0
3434
}
3535

3636
func CurriedFloat64Compare(tolerance float64) func(float64, float64) int {

0 commit comments

Comments
 (0)