Skip to content

Commit 04303f0

Browse files
committed
Update golangci-lint configuration
1 parent fac3329 commit 04303f0

File tree

5 files changed

+9
-10
lines changed

5 files changed

+9
-10
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
env:
66
GOFUMPT_VERSION: 0.3.1
7-
GOLANGCI_LINT_VERSION: 1.49.0
7+
GOLANGCI_LINT_VERSION: 1.56.2
88
jobs:
99
linux:
1010
runs-on: ubuntu-latest

.golangci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ linters:
22
enable:
33
- asciicheck
44
- bodyclose
5-
- depguard
65
- dogsled
76
- dupl
87
- durationcheck
@@ -37,6 +36,8 @@ linters:
3736
- predeclared
3837
- promlinter
3938
- revive
39+
- rowserrcheck
40+
- sqlclosecheck
4041
- staticcheck
4142
- stylecheck
4243
- tagliatelle
@@ -46,9 +47,11 @@ linters:
4647
- unconvert
4748
- unparam
4849
- unused
50+
- wastedassign
4951
- whitespace
5052
disable:
5153
- cyclop
54+
- depguard
5255
- exhaustive
5356
- exhaustivestruct
5457
- funlen
@@ -63,10 +66,7 @@ linters:
6366
- nestif
6467
- nlreturn
6568
- paralleltest
66-
- rowserrcheck # https://github.com/golangci/golangci-lint/issues/2649
67-
- sqlclosecheck # https://github.com/golangci/golangci-lint/issues/2649
6869
- testpackage
69-
- wastedassign # https://github.com/golangci/golangci-lint/issues/2649
7070
- wrapcheck
7171
- wsl
7272

encoding/geojson/geojson.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ func EncodeGeometryWithBBox() EncodeGeometryOption {
313313
// EncodeGeometryWithCRS adds the crs field to the Geometry GeoJSON encoding.
314314
func EncodeGeometryWithCRS(crs *CRS) EncodeGeometryOption {
315315
return EncodeGeometryOption{
316-
onGeometryHandler: func(g *Geometry, t geom.T, opts ...EncodeGeometryOption) error {
316+
onGeometryHandler: func(g *Geometry, _ geom.T, _ ...EncodeGeometryOption) error {
317317
var err error
318318
g.CRS = crs
319319
return err

encoding/wkb/sql_example_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ func Example_value_different_shapes() {
160160
}
161161

162162
for _, s := range shapes {
163+
s := s
163164
result, err := db.Exec(`INSERT INTO objects (name, location) VALUES (?, ?);`, s.Name, &s.Geom)
164165
if err != nil {
165166
log.Fatal(err)

xy/internal/robustdeterminate/robust_determinate.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,7 @@ func SignOfDet2x2(x1, y1, x2, y2 float64) Sign {
8181
*/
8282
if 0.0 < y1 {
8383
if 0.0 < y2 {
84-
if y1 <= y2 {
85-
} else {
84+
if y1 > y2 {
8685
sign = Negative
8786
swap = x1
8887
x1 = x2
@@ -145,8 +144,7 @@ func SignOfDet2x2(x1, y1, x2, y2 float64) Sign {
145144
*/
146145
if 0.0 < x1 {
147146
if 0.0 < x2 {
148-
if x1 <= x2 {
149-
} else {
147+
if x1 > x2 {
150148
return sign
151149
}
152150
} else {

0 commit comments

Comments
 (0)