From 33e3e204dce5431e9b1570498ba1cd1cc3ef31a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E8=A1=8D=E5=BF=97523370910113?= Date: Wed, 16 Oct 2024 17:26:44 +0800 Subject: [PATCH] Update JOJ3 Configuration Schema --- JOJ3-Configuration-Schema.md | 49 ++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 21 deletions(-) diff --git a/JOJ3-Configuration-Schema.md b/JOJ3-Configuration-Schema.md index 4fefa16..4c0ecea 100644 --- a/JOJ3-Configuration-Schema.md +++ b/JOJ3-Configuration-Schema.md @@ -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 max_size = 5 # 5MB repo max size +check_release = "True" release_tags = ["h1", "h2", "h3"] # list of valid release tags [files] @@ -166,17 +167,15 @@ Some parsers can also be further configured.
Sample task.toml ```toml -# general task configuration -task="Homework 1 exercise 2" # task name +task = "h1 ex2" # task name release.deadline = 2024-10-12 23:59:00+08:00 -release.stages = [ "compile" ] +release.stages = ["compile"] [compile] -command = "cmake" -files.import = [ "main.c", "task.h", "CMakelist.txt" ] # files to include with repo code when compiling -files.export = [ "p1", "p1-msan" ] -# limit.cpu = 300 # allow 300s for complex/long compilation +command = "cmake . && make" +files.import = ["main.c", "task.h", "CMakeLists.txt"] +files.export = ["p1", "p1-msan"] # parsers result-status.comment = "Congratulations! Your code compiled successfully." @@ -187,13 +186,21 @@ result-details.stderr = true [filelength] name = "File length check" command = "file-length" # command to run -tests = [ "max", "recommend"] # keywords caught by corresponding JOJ plugin -weights = [ 50, 20 ] # weight of each keyword -parsers +tests = ["max", "recommend"] # keywords caught by corresponding JOJ plugin +weights = [50, 20] # weight of each keyword +parsers = [] [clangtidy] 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] [cppcheck] @@ -203,17 +210,17 @@ weights = [20, 10, 15, 15, 10] [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 ." -tests = [ "runtime", "readability", "build" ] -weights = [ 10, 20, 15] +tests = ["runtime", "readability", "build"] +weights = [10, 20, 15] [judge-base] -command="./driver ./mumsh" -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 -score = 10 # default OJ score for each test case +command = "./driver ./mumsh" +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 +score = 10 # default OJ score for each test case parsers = ["diff", "stderr"] size.diff = 4 -size.stderr = 4 +size.stderr = 4 diff.ignorespaces = true case4.score = 15 @@ -228,9 +235,9 @@ case6.size.diff = 64 case8.size.stderr = 128 [judge-msan] -command="./driver ./mumsh-msan" -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 +command = "./driver ./mumsh-msan" +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 score = 10 parsers = ["diff"] skip = ["case0", "case11"]