feat: allow running only a specific linter without modifying the file configuration ()

This commit is contained in:
Ludovic Fernandez 2024-03-06 20:43:12 +01:00 committed by GitHub
parent 92c05581a3
commit 803970f0ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 28 additions and 3 deletions
pkg/commands

View file

@ -28,6 +28,9 @@ func setupLintersFlagSet(v *viper.Viper, fs *pflag.FlagSet) {
fs.StringSliceP("presets", "p", nil,
color.GreenString(fmt.Sprintf("Enable presets (%s) of linters. Run 'golangci-lint help linters' to see "+
"them. This option implies option --disable-all", strings.Join(lintersdb.AllPresets(), "|"))))
fs.StringSlice("enable-only", nil,
color.GreenString("Override linters configuration section to only run the specific linter(s)")) // Flags only.
}
func setupRunFlagSet(v *viper.Viper, fs *pflag.FlagSet) {