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

build(deps): bump github.com/bombsimon/wsl/v4 from 3.4.0 to 4.2.0 #4215

Merged
merged 3 commits into from
Nov 29, 2023

Conversation

alexandear
Copy link
Member

@alexandear alexandear commented Nov 20, 2023

Bumps github.com/bombsimon/wsl/v4 from 3.4.0 to 4.2.0.

bombsimon/wsl@v3.4.0...v4.2.0

This update is done by hand because dependabot is not able to update a major version of a dependency.

@alexandear alexandear marked this pull request as ready for review November 20, 2023 18:36
@alexandear alexandear added linter: update version Update version of linter dependencies Relates to an upstream dependency go Pull requests that update Go code labels Nov 20, 2023
@ldez ldez self-requested a review November 20, 2023 18:57
@ldez
Copy link
Member

ldez commented Nov 20, 2023

@bombsimon It seems there is a regression on line directives, can you take a look?

@ldez ldez added the blocked Need's direct action from maintainer label Nov 20, 2023
@bombsimon bombsimon self-assigned this Nov 21, 2023
@bombsimon
Copy link
Member

Super nice that you added the tests @ldez! ⭐ This would've caused the same issue that I just fixed in #3967

However, that's not the reason the test fails. The reason is this code.

The reason I added this is because without this running the analyzer will also operate on non source files from the cache. If I remove these lines, this is what I currently get running in its own repo:

› go run ./cmd/wsl ./...
/Users/simon/Library/Caches/go-build/2b/2b593556207605cff3837705ff4e2fcabdca47a62d42266c0a3a71c407e20003-d:47:14: block should not start with a whitespace
/Users/simon/Library/Caches/go-build/2b/2b593556207605cff3837705ff4e2fcabdca47a62d42266c0a3a71c407e20003-d:53:1: block should not end with a whitespace (or comment)
exit status 3

The same code was added in gochecknoglobals here. That was added by me as well and here's some background to that: leighmcculloch/gochecknoglobals#16 (comment). As seen in that and the comment after both gochecknoglobals and go-mnd processed go files from the cache.

I don't know why this isn't an issue with more linters, maybe because they have a smaller scope and not as strict or opinionated lints? I never got around to dig deeper to why this is happening.

Do you have any suggestions on how to get rid of the constraint of only checking .go suffixed files but also not processing the files from the cache?

@bombsimon bombsimon changed the title build(deps): bump github.com/bombsimon/wsl/v4 from 3.4.0 to 4.1.0 build(deps): bump github.com/bombsimon/wsl/v4 from 3.4.0 to 4.2.0 Nov 28, 2023
@bombsimon
Copy link
Member

I created golang/go#64436 but then I saw that generated code in general was discussed in golang/go#43481. Since I was using Position instead of PositionFor when getting the filename I changed that instead.

I don't know what's expected here actually but I think filtering out files manually like suggested in the linked issue is reasonable and in this case it will work just fine after moving to PositionFor.

I updated wsl and released v4.2.0 which fixes the line directive test.

@ldez ldez removed the blocked Need's direct action from maintainer label Nov 29, 2023
Copy link
Member

@ldez ldez left a comment

Choose a reason for hiding this comment

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

LGTM

@ldez ldez merged commit e32f2f3 into golangci:master Nov 29, 2023
12 checks passed
@alexandear alexandear deleted the bump-bombsimon-wsl branch November 29, 2023 17:32
Antonboom pushed a commit to Antonboom/golangci-lint that referenced this pull request Mar 3, 2024
…langci#4215)

Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
Co-authored-by: Simon Sawert <simon@sawert.se>
@ldez ldez modified the milestone: v1.56 Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Relates to an upstream dependency go Pull requests that update Go code linter: update version Update version of linter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants