epita-rules: Requires placeholder for each flag

This commit is contained in:
nemunaire 2022-07-12 12:03:54 +02:00
parent a85c2efa45
commit 86d9a039c8

View File

@ -23,6 +23,10 @@ func EPITACheckKeyFlag(flag *fic.FlagKey, raw string) (errs []error) {
errs = append(errs, fmt.Errorf("CVE numbers are required to be UCQ with choice_cost"))
}
if flag.Placeholder == "" && (flag.Type == "text" || (flag.Type == "ucq" && flag.ChoicesCost > 0)) {
errs = append(errs, fmt.Errorf("no placeholder defined"))
}
return
}