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

fix: move show-stats field from run to output #4439

Merged
merged 2 commits into from
Mar 4, 2024

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
pkg/config/run.go Outdated Show resolved Hide resolved
pkg/commands/run.go Outdated Show resolved Hide resolved
@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
12 checks passed
@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