Skip to content

Commit

Permalink
docs(cmd): clarify repeated trend stats validation comment
Browse files Browse the repository at this point in the history
Related to #1143 (comment)
  • Loading branch information
Ivan Mirić committed Oct 30, 2019
1 parent b1b488e commit 8bbc027
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions cmd/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,11 +311,10 @@ func getConsolidatedConfig(fs afero.Fs, cliConf Config, runner lib.Runner) (conf
conf = applyDefault(conf)

// TODO(imiric): Move this validation where it makes sense in the configuration
// refactor of #883. Currently we validate CLI flags in cmd.getOptions. Yet
// there is no place where configuration is validated after applying all other
// sources, like environment variables (besides inline in the runCmd itself...).
// So this repeats the trend stats validation in case other sources overrode our
// default value.
// refactor of #883. This repeats the trend stats validation already done
// for CLI flags in cmd.getOptions, in case other configuration sources
// (e.g. env vars) overrode our default value. This is not done in
// lib.Options.Validate to avoid circular imports.
if err = ui.ValidateSummary(conf.SummaryTrendStats); err != nil {
return conf, err
}
Expand Down

0 comments on commit 8bbc027

Please sign in to comment.