epita-rules: Requires placeholder for each flag
This commit is contained in:
parent
a85c2efa45
commit
86d9a039c8
@ -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"))
|
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
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user