From 3f31d04ca04569c02e13fbf6c6a6e8e604e29ee3 Mon Sep 17 00:00:00 2001 From: ccoVeille <3875889+ccoVeille@users.noreply.github.com> Date: Tue, 27 May 2025 11:08:31 +0200 Subject: [PATCH 1/2] fix: formatters help text and CLI flags The flags were the ones of the linters commands. The help text was displaying the linters help text. And the completions was allowing to use --disable and --enable-only that are not supported by the formatters commands. --- pkg/commands/formatters.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/commands/formatters.go b/pkg/commands/formatters.go index a3fafd1d25c9..4abbb6728ccb 100644 --- a/pkg/commands/formatters.go +++ b/pkg/commands/formatters.go @@ -59,7 +59,7 @@ func newFormattersCommand(logger logutils.Log) *formattersCommand { fs.SortFlags = false // sort them as they are defined here setupConfigFileFlagSet(fs, &c.opts.LoaderOptions) - setupLintersFlagSet(c.viper, fs) + setupFormattersFlagSet(c.viper, fs) fs.BoolVar(&c.opts.JSON, "json", false, color.GreenString("Display as JSON")) From 5e1ddd92933555f1d2f3095fa336c6967abcd61e Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Tue, 27 May 2025 11:42:42 +0200 Subject: [PATCH 2/2] review --- pkg/commands/formatters.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/commands/formatters.go b/pkg/commands/formatters.go index 4abbb6728ccb..22a9914ae2ff 100644 --- a/pkg/commands/formatters.go +++ b/pkg/commands/formatters.go @@ -59,6 +59,7 @@ func newFormattersCommand(logger logutils.Log) *formattersCommand { fs.SortFlags = false // sort them as they are defined here setupConfigFileFlagSet(fs, &c.opts.LoaderOptions) + setupFormattersFlagSet(c.viper, fs) fs.BoolVar(&c.opts.JSON, "json", false, color.GreenString("Display as JSON"))