This repository has been archived on 2025-06-10. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
server/repochecker/grammalecte/flags.go

37 lines
1 KiB
Go

package main
import (
"srs.epita.fr/fic-server/admin/sync"
"srs.epita.fr/fic-server/libfic"
)
func GrammalecteCheckKeyFlag(flag *fic.FlagKey, raw string, exceptions *sync.CheckExceptions) (errs []error) {
label, _, _, _ := flag.AnalyzeFlagLabel()
errs = append(errs, grammalecte("label ", label, exceptions, &CommonOpts)...)
if len(flag.Help) > 0 {
errs = append(errs, grammalecte("help ", flag.Help, exceptions, &CommonOpts)...)
}
return
}
func GrammalecteCheckFlagChoice(choice *fic.FlagChoice, exceptions *sync.CheckExceptions) (errs []error) {
errs = append(errs, grammalecte("label ", choice.Label, exceptions, &CommonOpts)...)
return
}
func GrammalecteCheckHint(hint *fic.EHint, exceptions *sync.CheckExceptions) (errs []error) {
if len(hint.Title) > 0 {
errs = append(errs, grammalecte("title ", hint.Title, exceptions, &CommonOpts)...)
}
return
}
func GrammalecteCheckMDText(str string, exceptions *sync.CheckExceptions) (errs []error) {
errs = append(errs, grammalecte("", str, exceptions, &CommonOpts)...)
return
}