repochecker/epita: Check full numbered flag has type number

This commit is contained in:
nemunaire 2022-11-02 17:42:25 +01:00
parent 6a5119cb6a
commit cc37348aaa

View File

@ -178,7 +178,7 @@ func buildKeyFlag(exercice *fic.Exercice, flag ExerciceFlag, flagline int, defau
// Call checks hooks
for _, h := range hooks.flagKeyHooks {
for _, e := range h(fk, raw, exceptions) {
for _, e := range h(fk, raw, exceptions.Filter2ndCol(strconv.Itoa(flagline))) {
errs = append(errs, NewFlagError(exercice, &flag, flagline, e))
}
}
@ -221,7 +221,7 @@ func buildKeyFlag(exercice *fic.Exercice, flag ExerciceFlag, flagline int, defau
// Call checks hooks
for _, h := range hooks.flagChoiceHooks {
for _, e := range h(fc, exceptions) {
for _, e := range h(fc, exceptions.Filter2ndCol(strconv.Itoa(flagline))) {
errs = append(errs, NewFlagError(exercice, &flag, flagline, e))
}
}
@ -242,7 +242,7 @@ func buildKeyFlag(exercice *fic.Exercice, flag ExerciceFlag, flagline int, defau
// Call checks hooks
for _, h := range hooks.flagKeyWithChoicesHooks {
for _, e := range h(fk, raw, choices, exceptions) {
for _, e := range h(fk, raw, choices, exceptions.Filter2ndCol(strconv.Itoa(flagline))) {
errs = append(errs, NewFlagError(exercice, &flag, flagline, e))
}
}