feat: simplified format

manuel 2024-10-12 22:06:05 +08:00
parent 9e8cc4f84a
commit 2bec67842d

@ -137,70 +137,75 @@ Some parsers can also be further configured.
```toml
# general task configuration
task="Homework 1 exercise 2" # used for "comment" field in "json" config file
stages = [ "compile", "code_quality", "judge-base", "judge-msan" ] # list of stages, can feature a unique stage
stages = [ "compile", "code-quality", "judge-base", "judge-msan" ] # list of stages, can feature a unique stage
[compile]
command = "cmake"
command = "cmake"
copyfiles = [ "main.c", "task.h" ] # files to include with repo code when compiling
# limit.cpu = 600 # allow 600s for complex/long compilation
# limit.cpu = 600 # allow 600s for complex/long compilation
[[code_quality]]
command = "file-length" # command to run
tests = [ "max", "recommend"] # keywords caught by corresponding JOJ plugin
weights = [ 50, 20 ] # weight of each keyword
[code-quality]
filelength.name = "File length check"
filelength.command = "file-length" # command to run
filelength.tests = [ "max", "recommend"] # keywords caught by corresponding JOJ plugin
filelenght.weights = [ 50, 20 ] # weight of each keyword
filelength.parsers = ["stdout", "stderr"]
[[code_quality]]
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" ]
weights = [100, 100, 50, 10, 5, 5, 10, 5, 5, 8, 5, 5, 5, 5, 8]
clangtidy.command = "clang-tidy-18 -header-filter=.* -quiet -load=/usr/local/lib/libcodequality.so -p build"
clangtidy.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" ]
clangtidy.weights = [100, 100, 50, 10, 5, 5, 10, 5, 5, 8, 5, 5, 5, 5, 8]
[[code_quality]]
command = "cppcheck --enable=all --language=c++ --suppress=*:build* --suppress=missingIncludeSystem ./"
tests = ["error", "warning", "portability", "performance", "style"]
weights = [20, 10, 15, 15, 10]
cppcheck.command = "cppcheck --enable=all --language=c++ --suppress=*:build* --suppress=missingIncludeSystem ./"
cppcheck.tests = ["error", "warning", "portability", "performance", "style"]
cppcheck.weights = [20, 10, 15, 15, 10]
[[code_quality]]
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]
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 ."
cpplint.tests = [ "runtime", "readability", "build" ]
cpplint.weights = [ 10, 20, 15]
[judge-base]
driver="./driver ./mumsh"
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
whitespace = true
case4.score = 15
case4.limit.cpu = 30
case4.limit.mem = 10
case5.score = 25
case5.parsers = [ ]
case6.score = 25
case6.parsers = ["diff"]
case6.size.diff = 64
case8.whitespace = false
case8.size.stderr = 128
[judge-msan]
driver="./driver ./mumsh-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
score = 10
parsers = ["diff"]
skip = ["case0.in", "case11.in"]
whitespace = false
[[test_case]]
filename = "case4.in" # filename of a test case with non-default setup
stages = [ "judge-base" ]
score = 20 # non-default score
limit.cpu = 5
limit.mem = 5
size.stdout = 8
size.sterr = 8
case4.score = 15
case4.limit.cpu = 30
case4.limit.mem = 10
[[test_case]]
filename = "case4.in"
stages = [ "judge-msan" ]
score = 20
limit.cpu = 5
limit.mem = 100 # limit.cpu is kept as default
case5.score = 25
case5.parsers = [ ]
[[test_case]]
filename = "case5.in" # filename of a test case with non-default setup
score = 20 # non-default score
limit.mem = 20
hide = true
[[test_case]]
filename = "case9.in" # filename of a test case with non-default setup
stages = [ "judge-base" ]
case6.score = 25
case6.parsers = ["stderr"]
case6.size.stderr = 32
```
</details>