File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ use crate::{
14
14
collections:: { hash_set_with_capacity, HashSet } ,
15
15
exercise:: { RunnableExercise , OUTPUT_CAPACITY } ,
16
16
info_file:: { ExerciseInfo , InfoFile } ,
17
- CURRENT_FORMAT_VERSION ,
17
+ CURRENT_FORMAT_VERSION , MAX_EXERCISE_NAME_LEN ,
18
18
} ;
19
19
20
20
// Find a char that isn't allowed in the exercise's `name` or `dir`.
@@ -59,6 +59,9 @@ fn check_info_file_exercises(info_file: &InfoFile) -> Result<HashSet<PathBuf>> {
59
59
if name. is_empty ( ) {
60
60
bail ! ( "Found an empty exercise name in `info.toml`" ) ;
61
61
}
62
+ if name. len ( ) > MAX_EXERCISE_NAME_LEN {
63
+ bail ! ( "The length of the exercise name `{name}` is bigger than the maximum {MAX_EXERCISE_NAME_LEN}" ) ;
64
+ }
62
65
if let Some ( c) = forbidden_char ( name) {
63
66
bail ! ( "Char `{c}` in the exercise name `{name}` is not allowed" ) ;
64
67
}
You can’t perform that action at this time.
0 commit comments