Skip to content

Conversation

ldez
Copy link
Member

@ldez ldez commented Mar 2, 2024

During the review of the PR about show-stats I missed that the value was not in the right structure.

This PR deprecated the old run.show-stats, and replaced it with output.show-stats.

The flag --show-stats is not impacted, it's only about the file configuration.

The old run.show-stats still works but with a deprecation log message.

@ldez ldez added the area: CLI Related to CLI label Mar 2, 2024
@ldez ldez requested review from bombsimon and Antonboom March 2, 2024 20:55
@ldez ldez added topic: cleanup Related to code, process, or doc cleanup area: config Related to .golangci.yml and/or cli options and removed area: CLI Related to CLI labels Mar 2, 2024
@ldez ldez requested a review from alexandear March 2, 2024 21:24
@ldez ldez changed the title fix: move show-stats field fix: move show-stats field from run to output Mar 3, 2024
@ldez ldez force-pushed the fix/move-show-stats branch from 3093371 to ef2fd46 Compare March 3, 2024 19:53
@ldez ldez merged commit 8f2459b into golangci:master Mar 4, 2024
@ldez ldez deleted the fix/move-show-stats branch March 4, 2024 13:15
@ldez ldez added this to the next milestone Mar 4, 2024
c.log.Warnf("The configuration option `run.show-stats` is deprecated, please use `output.show-stats`")
}

if !c.cfg.Run.ShowStats && !c.cfg.Output.ShowStats {
Copy link
Contributor

Choose a reason for hiding this comment

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

de morgan cosmetic:

if !(c.cfg.Run.ShowStats || c.cfg.Output.ShowStats) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: config Related to .golangci.yml and/or cli options topic: cleanup Related to code, process, or doc cleanup
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants