Skip to content

Conversation

@timofurrer
Copy link

This change set adds a new command line flag called --clear-config-outputs. When setting this flag all configured outputs from the config file will be cleared and only the ones from the command line respected or if none, fallback to the default happens.

This is useful for applications like the golangci-lint LSP that invoke golangci-lint and want to ensure that only the JSON output is enabled without respecting the users config.

@boring-cyborg
Copy link

boring-cyborg bot commented Dec 19, 2025

Hey, thank you for opening your first Pull Request !

@CLAassistant
Copy link

CLAassistant commented Dec 19, 2025

CLA assistant check
All committers have signed the CLA.

@timofurrer

This comment was marked as off-topic.

This change set adds a new command line flag called
`--clear-config-outputs`. When setting this flag all configured outputs
from the config file will be cleared and only the ones from the command
line respected or if none, fallback to the default happens.

This is useful for applications like the golangci-lint LSP that invoke
golangci-lint and want to ensure that only the JSON output is enabled
without respecting the users config.
@timofurrer timofurrer force-pushed the clear-config-outputs-flag branch from 271cea7 to 0ead74b Compare December 19, 2025 11:46
@ldez ldez self-requested a review December 19, 2025 12:05
@ldez ldez added area: config Related to .golangci.yml and/or cli options area: CLI Related to CLI labels Dec 19, 2025
@ldez
Copy link
Member

ldez commented Dec 19, 2025

  1. The name of the flag is unclear and confusing.
  2. I'm not sure about the proposed approach.
  3. The tests are not portable and written in a "Describe" style.
  4. docs/data/cli_help.json should not be changed.

I would have preferred an issue, focused on the explanation of the problem, before opening a PR.

I need to think about this more.

For now, please don't change the PR content to avoid wasting time on this.

@ldez ldez added the blocked Need's direct action from maintainer label Dec 19, 2025
@timofurrer
Copy link
Author

@ldez does it make sense open that issue then ... before I waste more time on this ?

@timofurrer
Copy link
Author

Anyways, here we go: #6274

@timofurrer timofurrer marked this pull request as draft December 19, 2025 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: CLI Related to CLI area: config Related to .golangci.yml and/or cli options blocked Need's direct action from maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants