mirror of
https://github.com/scratchfoundation/golangci-lint.git
synced 2025-08-21 10:48:44 -04:00
feat: allow running only a specific linter without modifying the file configuration (#4438)
This commit is contained in:
parent
92c05581a3
commit
803970f0ed
2 changed files with 28 additions and 3 deletions
pkg/commands
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue