Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to golangci-lint v0.58.2 #617

Merged
merged 1 commit into from
May 21, 2024
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
2 changes: 1 addition & 1 deletion .ci/golint.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golangci/golangci-lint:v1.58.1
FROM golangci/golangci-lint:v1.58.2

RUN apt-get update \
&& apt-get install -y -q --no-install-recommends \
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Unreleased

- Upgrades `golangci-lint` to `v1.58.1`.
- Upgrades `golangci-lint` to `v1.58.2`.

- Fixes a bug where geometry collections with mixed coordinate types were
erroneously allowed during WKT and WKB parsing.
Expand Down
2 changes: 1 addition & 1 deletion geom/geojson_feature_collection.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ func (c *GeoJSONFeatureCollection) UnmarshalJSON(p []byte) error {
Type string `json:"type"`
Features []GeoJSONFeature `json:"features"`
}
if err := json.Unmarshal(p, &topLevel); err != nil { //nolint:musttag
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nolint:musttag was to work around a bug, which was fixed in go-simpler/musttag#93.

if err := json.Unmarshal(p, &topLevel); err != nil {
return err
}
if topLevel.Type == "" {
Expand Down
2 changes: 1 addition & 1 deletion geom/type_null_geometry.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func (ng *NullGeometry) Scan(value interface{}) error {
// Value implements the database/sql/driver.Valuer interface.
func (ng NullGeometry) Value() (driver.Value, error) {
if !ng.Valid {
return nil, nil
return nil, nil //nolint:nilnil
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return nil, nil is being detected as suspicious (usually this would be an error). It's not here, because the database/sql/driver.Valuer interface expects nil values (it interprets them as NULL).

}
return ng.Geometry.Value()
}
Loading