repochecker/grammalecte: Remove unwanted poncfin_règle1 for labels

This commit is contained in:
nemunaire 2022-10-31 12:33:53 +01:00
parent a790ced236
commit a4701af619
1 changed files with 7 additions and 1 deletions

View File

@ -7,7 +7,13 @@ import (
func GrammalecteCheckKeyFlag(flag *fic.FlagKey, raw string, exceptions *sync.CheckExceptions) (errs []error) {
label, _, _, _ := flag.AnalyzeFlagLabel()
errs = append(errs, grammalecte("label ", label, exceptions, &CommonOpts)...)
for _, err := range grammalecte("label ", label, exceptions, &CommonOpts) {
if e, ok := err.(GrammarError); ok && e.RuleId == "poncfin_règle1" {
continue
}
errs = append(errs, err)
}
if len(flag.Help) > 0 {
errs = append(errs, grammalecte("help ", flag.Help, exceptions, &CommonOpts)...)