mirror of
https://github.com/scratchfoundation/golangci-lint.git
synced 2025-08-10 21:38:44 -04:00
fix: hide useless warning (#4587)
This commit is contained in:
parent
5a66842555
commit
77a8601aa3
2 changed files with 11 additions and 0 deletions
pkg/commands
|
@ -59,6 +59,13 @@ func newLintersCommand(logger logutils.Log) *lintersCommand {
|
|||
}
|
||||
|
||||
func (c *lintersCommand) preRunE(cmd *cobra.Command, _ []string) error {
|
||||
// Hack to hide deprecation messages related to `--skip-dirs-use-default`:
|
||||
// Flags are not bound then the default values, defined only through flags, are not applied.
|
||||
// In this command, linters information are the only requirements, i.e. it don't need flag values.
|
||||
//
|
||||
// TODO(ldez) add an option (check deprecation) to `Loader.Load()` but this require a dedicated PR.
|
||||
c.cfg.Run.UseDefaultSkipDirs = true
|
||||
|
||||
loader := config.NewLoader(c.log.Child(logutils.DebugKeyConfigReader), c.viper, cmd.Flags(), c.opts.LoaderOptions, c.cfg)
|
||||
|
||||
if err := loader.Load(); err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue