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

Consider formatters.exclusions.warn-unused settings and feature #5667

Closed
2 of 3 tasks
ccoVeille opened this issue Mar 31, 2025 · 3 comments · Fixed by #5668
Closed
2 of 3 tasks

Consider formatters.exclusions.warn-unused settings and feature #5667

ccoVeille opened this issue Mar 31, 2025 · 3 comments · Fixed by #5668
Labels
area: formatters/fmt enhancement New feature or improvement

Comments

@ccoVeille
Copy link
Contributor

Welcome

How did you install golangci-lint?

Brew

Your feature request related to a problem? Please describe

Following #5339

Where an option was added for linters (very useful BTW)

There is a new option linters.exclusions.warn-unused that emits a warning if a linters.exclusions.rules or linters.exclusions.paths is unused.

I would like to get the same things for formatters

Thanks

Describe the solution you'd like

I would like to be able to report unused formatters exclusions via formatters.exclusions.warn-unused that emits a warning if a formatters.exclusions.rules or formatters.exclusions.paths is unused.

Thanks

Describe alternatives you've considered

checking code and PR about this setting

but I found nothing in :

  • the jsonschema reference
  • code
  • issues/PR

Additional context

I'm looking for a having a way to check if exclusion imported from migrate have a need.

Supporter

@ccoVeille ccoVeille added the enhancement New feature or improvement label Mar 31, 2025
@ldez ldez added declined and removed enhancement New feature or improvement labels Mar 31, 2025
@ldez
Copy link
Member

ldez commented Mar 31, 2025

Hello, the way to handle exclusions inside formatters is completely different from inside linters, it's not really possible to detect unused exclusion paths.

FYI, formatters.exclusions.rules doesn't exist.

@ldez ldez closed this as completed Mar 31, 2025
@ccoVeille
Copy link
Contributor Author

OK thanks indeed

@ldez
Copy link
Member

ldez commented Mar 31, 2025

🤔 maybe I can do a hack, I need to think about that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: formatters/fmt enhancement New feature or improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants