From ea8ad1d6db9ab054d07fec5d8f932306cb4ee83e Mon Sep 17 00:00:00 2001 From: Pierre-Olivier Mercier Date: Fri, 11 Oct 2024 14:55:49 +0200 Subject: [PATCH] sync: Don't warn about no flag if WIP --- admin/sync/exercice_defines.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/admin/sync/exercice_defines.go b/admin/sync/exercice_defines.go index 7f208802..23b119a1 100644 --- a/admin/sync/exercice_defines.go +++ b/admin/sync/exercice_defines.go @@ -173,7 +173,9 @@ func getExerciceParams(i Importer, exercice *fic.Exercice) (params ExerciceParam if params, _, err = parseExerciceParams(i, exercice.Path); err != nil { errs = multierr.Append(errs, NewChallengeTxtError(exercice, 0, err)) } else if len(params.Flags) == 0 && len(params.FlagsUCQ) == 0 && len(params.FlagsMCQ) == 0 { - errs = multierr.Append(errs, NewChallengeTxtError(exercice, 0, fmt.Errorf("has no flag"))) + if !params.WIP { + errs = multierr.Append(errs, NewChallengeTxtError(exercice, 0, fmt.Errorf("has no flag"))) + } } else { // Treat legacy UCQ flags as ExerciceFlag for _, flag := range params.FlagsUCQ {