FileStructureValidation
Checks if the submitted filename tree follows the template
files required to upload.
Config
fileStructureValidation:
ignore_in_submission: [String]? # list of path to skip checking [default: []]
Ignore List
The Grader has a builtin list of filenames/directory names which is automatically excluded.
*~
.directory
.DS_Store
._*
Thumbs.db
Desktop.ini
desktop.ini
The configuration key ignore_in_submission
may be used to append to the list of paths to skip checking; In other
words, if the specified path(s) exist in the student submission, the Grader will not warn the presence of the files.
There are two ways to specify the paths.
File/Directory Names
You may specify filenames or directory names in the list. This mode will find all files or directories matching the specified name within the submission. Glob expressions (
*
) are allowed.In general, this option should be used when you do not care where the ignored file or directory is located in. Examples include
__MACOSX
and._*
, where these files or directories may be present anywhere in the submission, and all of them should be ignored.You do not need to add leading or trailing slash (
/
) to the expression when using this mode.For example:
main.cpp
: Matches any file or directory with the namemain.cpp
*.cpp
: Matches any file or directory ending in.cpp
find -path
ExpressionsYou may also use expressions compatible with
find -path
to specify the ignore expression. Refer to the manpage offind
for more details.In general, this option should be used when more specific ignore rules need to be applied, for example only ignoring files under a specific directory or path component.
Note that in order to reference a path relative to the submission root, you must prepend
./
to the path.For example:
./src/*
: Matches all files undersrc
relative to the root of the submission*/src/main/*.java
: Matches all files starting with any path, containingsrc/main
in its path component, and ending with.java
Report
fileStructureValidation:
- isMatched: Boolean # whether the `submission` exactly matches the `template`
missingPaths: [String] # list of file paths that are missing from `template` list of files
extraPaths: [String] # list of file paths that are extra to `template` list of files
stderr: [String] # stderr of the underlying diff commands