feat: add sort-order option ()

This commit is contained in:
Ludovic Fernandez 2024-03-08 22:06:20 +01:00 committed by GitHub
parent c0f89fbbe4
commit 0683d45142
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 402 additions and 40 deletions
pkg/commands

View file

@ -71,6 +71,8 @@ func setupOutputFlagSet(v *viper.Viper, fs *pflag.FlagSet) {
color.GreenString("Make issues output unique by line"))
internal.AddFlagAndBind(v, fs, fs.Bool, "sort-results", "output.sort-results", false,
color.GreenString("Sort linter results"))
internal.AddFlagAndBind(v, fs, fs.StringSlice, "sort-order", "output.sort-order", nil,
color.GreenString("Sort order of linter results"))
internal.AddFlagAndBind(v, fs, fs.String, "path-prefix", "output.path-prefix", "",
color.GreenString("Path prefix to add to output"))
internal.AddFlagAndBind(v, fs, fs.Bool, "show-stats", "output.show-stats", false, color.GreenString("Show statistics per linter"))