Skip to content

Commit

Permalink
add flags to changelog (#304)
Browse files Browse the repository at this point in the history
* add "--include-checks" flag to changelog

* add ignore flags to changelog cmd
  • Loading branch information
Reuven Harrison authored Jul 4, 2023
1 parent 9851dd6 commit 57acd2f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion checker/default_checks.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func GetChecks(includeChecks utils.StringList) BackwardCompatibilityCheckConfig
func LevelOverrides(includeChecks utils.StringList) map[string]Level {
result := map[string]Level{}
for _, s := range includeChecks {
// if the checker was explicitly included with the `-include-checks`,
// if the checker was explicitly included with the `--include-checks`,
// it means that it's output is considered a breaking change,
// so the returned level should overwritten to ERR.
result[s] = ERR
Expand Down
3 changes: 3 additions & 0 deletions internal/changelog.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ In 'composed' mode, base and revision can be a glob and oasdiff will compare mat
cmd.PersistentFlags().StringVarP(&flags.stripPrefixRevision, "strip-prefix-revision", "", "", "strip this prefix from paths in revised-spec before comparison")
cmd.PersistentFlags().BoolVarP(&flags.includePathParams, "include-path-params", "", false, "include path parameter names in endpoint matching")
cmd.PersistentFlags().VarP(newEnumValue([]string{LangEn, LangRu}, LangDefault, &flags.lang), "lang", "l", "language for localized output")
cmd.PersistentFlags().StringVarP(&flags.errIgnoreFile, "err-ignore", "", "", "configuration file for ignoring errors")
cmd.PersistentFlags().StringVarP(&flags.warnIgnoreFile, "warn-ignore", "", "", "configuration file for ignoring warnings")
cmd.PersistentFlags().VarP(newEnumSliceValue(checker.GetOptionalChecks(), nil, &flags.includeChecks), "include-checks", "i", "comma-separated list of optional checks")
cmd.PersistentFlags().IntVarP(&flags.deprecationDays, "deprecation-days", "d", 0, "minimal number of days required between deprecating a resource and removing it")

return &cmd
Expand Down

0 comments on commit 57acd2f

Please sign in to comment.