-
Notifications
You must be signed in to change notification settings - Fork 19
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
Fix Golangci Lint Integration #453
Conversation
@@ -10,9 +10,9 @@ jobs: | |||
steps: | |||
- uses: actions/checkout@v2 | |||
- name: Install dependencies | |||
run: sudo apt update && sudo sudo apt install libgdal-dev libgeos-dev libproj-dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gdal and proj were unneeded.
if b.IsEmpty() { | ||
b, a = a, b | ||
nonEmpty = a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was to fix a lint error that complained that a
was never used after this assignment. The lint error was accurate, and I think using a new nonEmpty
variable better expresses what's going on here anyway.
@@ -380,7 +380,7 @@ func TestEnvelopeInvalidXYInteractions(t *testing.T) { | |||
t.Run(fmt.Sprintf("extend_to_include_invalid_xy_%d", i), func(t *testing.T) { | |||
env, err := NewEnvelope([]XY{{-1, -1}, {1, 1}}) | |||
expectNoErr(t, err) | |||
env, err = env.ExtendToIncludeXY(tc) | |||
_, err = env.ExtendToIncludeXY(tc) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was to fix a lint error complaining that env
was never used after this assignment (which was true!).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 👍🏼
Thanks for the review! |
Description
Golangci-lint was reporting some false positives, e.g. https://github.com/peterstace/simplefeatures/actions/runs/2316868808
I'm not really sure why that started happening all of a sudden (if anyone has any theories, I'd love to know).
This PR upgrades to the latest golangci-lint version, and fixes some new lint problems identified. That seems to get the build green again.
Check List
Have you:
Added unit tests? N/A
Add cmprefimpl tests? (if appropriate?) N/A
Updated release notes? (if appropriate?) N/A
Related Issue
N/A
Benchmark Results
N/A