Skip to content

Commit

Permalink
Bump golangci-lint version
Browse files Browse the repository at this point in the history
  • Loading branch information
twpayne committed Aug 12, 2024
1 parent 181956b commit 0314fae
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
env:
GOFUMPT_VERSION: 0.6.0
GOTOOLCHAIN: local
GOLANGCI_LINT_VERSION: 1.56.2
GOLANGCI_LINT_VERSION: 1.59.1
jobs:
linux:
runs-on: ubuntu-latest
Expand Down
9 changes: 5 additions & 4 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,20 @@ linters:
- asciicheck
- bidichk
- bodyclose
- canonicalheader
- containedctx
- contextcheck
- decorder
- dogsled
- dupl
- dupword
- durationcheck
- err113
- errcheck
- errchkjson
- errorlint
- execinquery
- exportloopref
- fatcontext
- forbidigo
- forcetypeassert
- gci
Expand All @@ -25,7 +27,6 @@ linters:
- gochecksumtype
- gocritic
- godot
- goerr113
- gofmt
- gofumpt
- goimports
Expand Down Expand Up @@ -78,6 +79,7 @@ linters:
- unparam
- unused
- usestdlibvars
- wastedassign
- whitespace
- zerologlint
disable:
Expand All @@ -104,7 +106,6 @@ linters:
- testpackage
- testpackage
- varnamelen
- wastedassign # https://github.com/golangci/golangci-lint/issues/2649
- wrapcheck
- wsl

Expand Down Expand Up @@ -149,7 +150,7 @@ issues:
- godot
path: "^xyz/"
- linters:
- goerr113
- err113
text: "do not define dynamic errors, use wrapped static errors instead"
- linters:
- forbidigo
Expand Down
14 changes: 7 additions & 7 deletions encoding/ewkb/sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func (p *Point) Valid() bool {
// Value returns the EWKB encoding of p.
func (p *Point) Value() (driver.Value, error) {
if p.Point == nil {
return nil, nil
return nil, nil //nolint:nilnil
}
return value(p.Point)
}
Expand Down Expand Up @@ -125,7 +125,7 @@ func (ls *LineString) Valid() bool {
// Value returns the EWKB encoding of ls.
func (ls *LineString) Value() (driver.Value, error) {
if ls.LineString == nil {
return nil, nil
return nil, nil //nolint:nilnil
}
return value(ls.LineString)
}
Expand Down Expand Up @@ -160,7 +160,7 @@ func (p *Polygon) Valid() bool {
// Value returns the EWKB encoding of p.
func (p *Polygon) Value() (driver.Value, error) {
if p.Polygon == nil {
return nil, nil
return nil, nil //nolint:nilnil
}
return value(p.Polygon)
}
Expand Down Expand Up @@ -195,7 +195,7 @@ func (mp *MultiPoint) Valid() bool {
// Value returns the EWKB encoding of mp.
func (mp *MultiPoint) Value() (driver.Value, error) {
if mp.MultiPoint == nil {
return nil, nil
return nil, nil //nolint:nilnil
}
return value(mp.MultiPoint)
}
Expand Down Expand Up @@ -230,7 +230,7 @@ func (mls *MultiLineString) Valid() bool {
// Value returns the EWKB encoding of mls.
func (mls *MultiLineString) Value() (driver.Value, error) {
if mls.MultiLineString == nil {
return nil, nil
return nil, nil //nolint:nilnil
}
return value(mls.MultiLineString)
}
Expand Down Expand Up @@ -265,7 +265,7 @@ func (mp *MultiPolygon) Valid() bool {
// Value returns the EWKB encoding of mp.
func (mp *MultiPolygon) Value() (driver.Value, error) {
if mp.MultiPolygon == nil {
return nil, nil
return nil, nil //nolint:nilnil
}
return value(mp.MultiPolygon)
}
Expand Down Expand Up @@ -300,7 +300,7 @@ func (gc *GeometryCollection) Valid() bool {
// Value returns the EWKB encoding of gc.
func (gc *GeometryCollection) Value() (driver.Value, error) {
if gc.GeometryCollection == nil {
return nil, nil
return nil, nil //nolint:nilnil
}
return value(gc.GeometryCollection)
}
Expand Down
2 changes: 1 addition & 1 deletion encoding/geojson/geojson.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func guessLayout3(coords3 [][][]geom.Coord) (geom.Layout, error) {
// Decode decodes g to a geometry.
func (g *Geometry) Decode() (geom.T, error) {
if g == nil {
return nil, nil
return nil, nil //nolint:nilnil
}
switch g.Type {
case "Point":
Expand Down

0 comments on commit 0314fae

Please sign in to comment.