sync: Check that UCQ value is not 'true' nor 'false'

This commit is contained in:
nemunaire 2021-10-29 23:28:10 +02:00
parent 89ca192890
commit 495b08463f

View File

@ -169,6 +169,10 @@ func buildKeyFlag(exercice fic.Exercice, flag ExerciceFlag, flagline int, defaul
Value: val,
})
if val == "true" || val == "false" {
errs = append(errs, fmt.Sprintf("%q: flag #%d: value can't be %q, this is not a MCQ, the value has to be meaningful. The value is shown to players as response identifier.", path.Base(exercice.Path), flagline), val)
}
if val == raw || (!flag.CaseSensitive && val == strings.ToLower(raw)) {
hasOne = true
}