repochecker/grammalecte: Allow * as all paragraphs

This commit is contained in:
nemunaire 2022-12-02 15:26:48 +01:00
parent ec9a3a408d
commit f087213f0a

View File

@ -186,7 +186,7 @@ func grammalecte(name string, text string, paragraph int, exceptions *sync.Check
}
for _, gerror := range data.GrammarErrors {
if (paragraph == 0 && exceptions.HasException(fmt.Sprintf(":%d:%s", data.Paragraph, gerror.RuleId))) || (paragraph < 0 && exceptions.HasException(fmt.Sprintf(":%s", gerror.RuleId))) || (paragraph > 0 && exceptions.HasException(fmt.Sprintf(":%d:%s", paragraph, gerror.RuleId))) {
if exceptions.HasException(fmt.Sprintf(":*:%s", gerror.RuleId)) || (paragraph == 0 && exceptions.HasException(fmt.Sprintf(":%d:%s", data.Paragraph, gerror.RuleId))) || (paragraph < 0 && exceptions.HasException(fmt.Sprintf(":%s", gerror.RuleId))) || (paragraph > 0 && exceptions.HasException(fmt.Sprintf(":%d:%s", paragraph, gerror.RuleId))) {
continue
}