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

whitespace: update after moving to the analysis package #4003

Merged
merged 9 commits into from
Nov 5, 2023

Conversation

bombsimon
Copy link
Member

@bombsimon bombsimon commented Aug 10, 2023

The whitespace linter is rewritten to use annalysis.Analyzer. This PR will make use of the new code.


This is a draft PR until ultraware/whitespace#8 is merged and a new release has been made.

@ldez ldez added the linter: update Update the linter implementation inside golangci-lint label Aug 10, 2023
@bombsimon bombsimon force-pushed the update-whitespace branch 2 times, most recently from 1f3d6c8 to 9ab7274 Compare August 11, 2023 19:54
@bombsimon bombsimon marked this pull request as ready for review November 2, 2023 19:30
Comment on lines +73 to +74
func notGoFmted() {
fmt.Println("Hello world")
Copy link
Member Author

Choose a reason for hiding this comment

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

Noticed here that we have the same situation as in #4003 (comment). Basically this results in the standalone linter and golangci-lint not fixing the same way, golangci-lint will leave the sapces before fmt whereas the linter itself will replace it with a tab.

I don't think there's anything we should do extra in this specific linter for this scenario (and also that's the same behaviour as before, we just didn't have a standalone linter) but yet another reason to try to integrate the suggested fixes with the golangci-lint fixer.

@bombsimon bombsimon changed the title Prepare for whitespace linter using the analysis package Update whitespace after moving to the analysis package Nov 2, 2023
@ldez ldez added the enhancement New feature or improvement label Nov 2, 2023
@ldez ldez changed the title Update whitespace after moving to the analysis package whitespace: update after moving to the analysis package Nov 2, 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 78742ac into golangci:master Nov 5, 2023
11 checks passed
Antonboom pushed a commit to Antonboom/golangci-lint that referenced this pull request Mar 3, 2024
)

Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
@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
enhancement New feature or improvement linter: update Update the linter implementation inside golangci-lint
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants