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

dev: standardization of the integration of formatters #5301

Merged
merged 9 commits into from
Jan 7, 2025

Conversation

ldez
Copy link
Member

@ldez ldez commented Jan 6, 2025

This standardizes the integration of formatters.

Side effect:

  • the package github.com/golangci/gofmt/goimports from the module github.com/golangci/gofmt is removed 🎉
  • the diff binary is not used anymore 🎉 🎉

Closes #3408
Closes #362

Other issues related to the usage of diff (on Windows):

Related to #5296

@ldez ldez added enhancement New feature or improvement linter: update Update the linter implementation inside golangci-lint labels Jan 6, 2025
@ldez ldez force-pushed the feat/analyzer-formatter branch from 0879174 to dbce1f6 Compare January 6, 2025 12:46
Copy link
Member

@bombsimon bombsimon left a comment

Choose a reason for hiding this comment

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

LGTM!

@StevenACoffman
Copy link
Contributor

This is wonderful! Is there a cli flag or something to run just the set of formatters prior to all other linters? While gci, gofumpt are 100% reliable, we have found that the suggested fixes for some linters are less reliable.

We don't bother to review formatter fixes, but we do want a human to check suggested fixes from other linters.

@ldez
Copy link
Member Author

ldez commented Jan 6, 2025

@StevenACoffman Take a look to #5296

@ldez ldez changed the title dev: one ring to rule them all (formatters) dev: standardization of the integration of formatters Jan 7, 2025
@ldez ldez added this to the next milestone Jan 7, 2025
@ldez ldez merged commit e68d278 into golangci:master Jan 7, 2025
15 checks passed
@ldez ldez deleted the feat/analyzer-formatter branch January 7, 2025 11:51
@ldez ldez modified the milestones: next, v1.64 Feb 11, 2025
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.

Errors during golangci operation Maybe inline diff tool into golangci-lint
4 participants