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: new processor order #5322

Merged
merged 4 commits into from
Jan 15, 2025
Merged

Conversation

ldez
Copy link
Member

@ldez ldez commented Jan 14, 2025

  • change processor order.
  • adds godoc for all processors.

This PR fixes processor inconsistencies, and provides a better output as limits are applied after the Fixer.

Some details:

  • UniqByLine: this processor was skipped when --fix was used.
  • MaxPerFileFromLinter: this processor was inconsistent with the other processors. It doesn't make sense to limit the issues for the Fixer by linter for a file: if golangci-lint fixes a file, all changes of one linter must be applied.
  • MaxSameIssues: this processor was skipped when --fix was used.
  • MaxFromLinter: this processor was skipped when --fix was used.
  • SourceCode: related to user output, the fixer doesn't need it.
  • PathShortener: related to user output, the fixer doesn't need it.
  • Severity: related to user output, the fixer doesn't need it.
  • PathPrefixer: related to user output, the fixer doesn't need it.
  • SortResults: related to user output, the fixer doesn't need it.

More explanation here: #5297 (comment)

@ldez ldez added enhancement New feature or improvement topic: cleanup Related to code, process, or doc cleanup labels Jan 14, 2025
@ldez ldez added this to the next milestone Jan 14, 2025
@ldez ldez requested a review from bombsimon January 14, 2025 23:47
@ldez ldez force-pushed the feat/processors-godoc-order branch from eacffc5 to 88d9ade Compare January 15, 2025 00:09
pkg/lint/runner.go Outdated Show resolved Hide resolved
pkg/lint/runner.go Outdated Show resolved Hide resolved
pkg/result/processors/autogenerated_exclude.go Outdated Show resolved Hide resolved
pkg/result/processors/diff.go Outdated Show resolved Hide resolved
pkg/result/processors/exclude_rules.go Outdated Show resolved Hide resolved
pkg/result/processors/invalid_issue.go Outdated Show resolved Hide resolved
pkg/result/processors/severity.go Outdated Show resolved Hide resolved
pkg/result/processors/source_code.go Outdated Show resolved Hide resolved
pkg/result/processors/sort_results.go Outdated Show resolved Hide resolved
@ldez ldez merged commit 362aea5 into golangci:master Jan 15, 2025
15 checks passed
@ldez ldez deleted the feat/processors-godoc-order branch January 15, 2025 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement topic: cleanup Related to code, process, or doc cleanup
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants