Update JOJ3 Configuration Schema

李衍志523370910113 2024-10-16 17:26:44 +08:00
parent 2ee5e4f329
commit 33e3e204dc

@ -76,6 +76,7 @@ It contains the part of the configuration that will be used globally for all ass
teaching_team = ["mac-wang", "jon-lee", "allen_wr"] # jaccounts teaching_team = ["mac-wang", "jon-lee", "allen_wr"] # jaccounts
max_size = 5 # 5MB repo max size max_size = 5 # 5MB repo max size
check_release = "True"
release_tags = ["h1", "h2", "h3"] # list of valid release tags release_tags = ["h1", "h2", "h3"] # list of valid release tags
[files] [files]
@ -166,17 +167,15 @@ Some parsers can also be further configured.
<details><summary>Sample task.toml</summary> <details><summary>Sample task.toml</summary>
```toml ```toml
# general task configuration task = "h1 ex2" # task name
task="Homework 1 exercise 2" # task name
release.deadline = 2024-10-12 23:59:00+08:00 release.deadline = 2024-10-12 23:59:00+08:00
release.stages = [ "compile" ] release.stages = ["compile"]
[compile] [compile]
command = "cmake" command = "cmake . && make"
files.import = [ "main.c", "task.h", "CMakelist.txt" ] # files to include with repo code when compiling files.import = ["main.c", "task.h", "CMakeLists.txt"]
files.export = [ "p1", "p1-msan" ] files.export = ["p1", "p1-msan"]
# limit.cpu = 300 # allow 300s for complex/long compilation
# parsers # parsers
result-status.comment = "Congratulations! Your code compiled successfully." result-status.comment = "Congratulations! Your code compiled successfully."
@ -187,13 +186,21 @@ result-details.stderr = true
[filelength] [filelength]
name = "File length check" name = "File length check"
command = "file-length" # command to run command = "file-length" # command to run
tests = [ "max", "recommend"] # keywords caught by corresponding JOJ plugin tests = ["max", "recommend"] # keywords caught by corresponding JOJ plugin
weights = [ 50, 20 ] # weight of each keyword weights = [50, 20] # weight of each keyword
parsers parsers = []
[clangtidy] [clangtidy]
command = "clang-tidy-18 -header-filter=.* -quiet -load=/usr/local/lib/libcodequality.so -p build" command = "clang-tidy-18 -header-filter=.* -quiet -load=/usr/local/lib/libcodequality.so -p build"
tests = [ "codequality-no-global-variables", "codequality-no-header-guard", "readability-function-size", "readability-duplicate-include", "readability-identifier-naming", "readability-redundant", "readability-misleading-indentation", "readability-misplaced-array-index", "cppcoreguidelines-init-variables", "bugprone-suspicious-string-compare", "google-global-names-in-headers", "clang-diagnostic", "clang-analyzer", "misc performance" ] tests = [
"codequality-no-global-variables", "codequality-no-header-guard",
"readability-function-size", "readability-duplicate-include",
"readability-identifier-naming", "readability-redundant",
"readability-misleading-indentation", "readability-misplaced-array-index",
"cppcoreguidelines-init-variables", "bugprone-suspicious-string-compare",
"google-global-names-in-headers", "clang-diagnostic", "clang-analyzer",
"misc performance"
]
weights = [100, 100, 50, 10, 5, 5, 10, 5, 5, 8, 5, 5, 5, 5, 8] weights = [100, 100, 50, 10, 5, 5, 10, 5, 5, 8, 5, 5, 5, 5, 8]
[cppcheck] [cppcheck]
@ -203,17 +210,17 @@ weights = [20, 10, 15, 15, 10]
[cpplint] [cpplint]
command = "cpplint --linelength=120 --filter=-legal,-readability/casting,-whitespace,-runtime/printf,-runtime/threadsafe_fn,-readability/todo,-build/include_subdir,-build/header_guard --recursive --exclude=build ." command = "cpplint --linelength=120 --filter=-legal,-readability/casting,-whitespace,-runtime/printf,-runtime/threadsafe_fn,-readability/todo,-build/include_subdir,-build/header_guard --recursive --exclude=build ."
tests = [ "runtime", "readability", "build" ] tests = ["runtime", "readability", "build"]
weights = [ 10, 20, 15] weights = [10, 20, 15]
[judge-base] [judge-base]
command="./driver ./mumsh" command = "./driver ./mumsh"
limit.cpu = 10 # default cpu limit (in sec) for each test case limit.cpu = 10 # default cpu limit (in sec) for each test case
limit.mem = 50 # set default mem limit (in MB) for all OJ test cases limit.mem = 50 # set default mem limit (in MB) for all OJ test cases
score = 10 # default OJ score for each test case score = 10 # default OJ score for each test case
parsers = ["diff", "stderr"] parsers = ["diff", "stderr"]
size.diff = 4 size.diff = 4
size.stderr = 4 size.stderr = 4
diff.ignorespaces = true diff.ignorespaces = true
case4.score = 15 case4.score = 15
@ -228,9 +235,9 @@ case6.size.diff = 64
case8.size.stderr = 128 case8.size.stderr = 128
[judge-msan] [judge-msan]
command="./driver ./mumsh-msan" command = "./driver ./mumsh-msan"
limit.cpu = 10 # default cpu limit (in sec) for each test case limit.cpu = 10 # default cpu limit (in sec) for each test case
limit.mem = 500 # set default mem limit (in MB) for all OJ test cases limit.mem = 500 # set default mem limit (in MB) for all OJ test cases
score = 10 score = 10
parsers = ["diff"] parsers = ["diff"]
skip = ["case0", "case11"] skip = ["case0", "case11"]