120 lines
4.0 KiB
TOML
120 lines
4.0 KiB
TOML
# general task configuration
|
|
task="Homework 1 exercise 2" # task name
|
|
|
|
release.deadline = 2024-10-12 23:59:00+08:00
|
|
release.stages = [ "compile" ]
|
|
|
|
[[stages]]
|
|
name = "Compilation"
|
|
command = "make.sh" # eg. script running cmake commands
|
|
files.import = [ "tools/make.sh", "src/main.c", "src/task.h", "srcCMakelist.txt" ]
|
|
files.export = [ "driver", "p2", "p2-msan" ]
|
|
limit.cpu = 180 # p2 takes long to compile
|
|
limit.stderr = 128
|
|
|
|
# compile parsers
|
|
parsers = [ "result-detail", "dummy", "result-status" ]
|
|
result-status.comment = "Congratulations! Your code compiled successfully."
|
|
dummy.comment = "\n\n### Details\n"
|
|
result-detail.exitstatus = true
|
|
result-detail.stderr = true
|
|
result-detail.time = false
|
|
result-detail.mem = false
|
|
|
|
[[stages]]
|
|
name = "File length check"
|
|
command = "./file-length 500 400 *.c *.h" # command to run
|
|
files.import = [ "tools/file-length" ]
|
|
|
|
parsers = [ "keyword", "dummy", "result-detail" ]
|
|
keyword.keyword = [ "max", "recommend"] # keywords caught by corresponding JOJ plugin
|
|
keyword.weight = [ 50, 20 ] # weight of each keyword
|
|
result-detail.exitstatus = true
|
|
result-detail.stderr = true
|
|
result-detail.time = false
|
|
result-detail.mem = false
|
|
|
|
[[stages]]
|
|
name = "Clang-tidy checks"
|
|
command = "run-clang-tidy-18 -header-filter=.* -quiet -load=/usr/local/lib/libcodequality.so -p build"
|
|
limit.stdout = 65
|
|
|
|
parsers = [ "clangtidy", "dummy", "result-detail" ]
|
|
clangtidy.keyword = [ "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.weight = [10, 10, 50, 10, 5, 5, 10, 5, 5, 8, 5, 5, 5, 5]
|
|
dummy.comment = "\n\n### Details\n"
|
|
result-detail.exitstatus = true
|
|
result-detail.stdout = true
|
|
result-detail.time = false
|
|
result-detail.mem = false
|
|
|
|
[[stages]]
|
|
name = "Cppcheck check"
|
|
command = "cppcheck --template='{\"file\":\"{file}\",\"line\":{line}, \"column\":{column}, \"severity\":\"{severity}\", \"message\":\"{message}\", \"id\":\"{id}\"}' --force --enable=all --quiet ./"
|
|
limit.stderr = 65
|
|
|
|
parsers = [ "cppcheck", "dummy", "result-detail" ]
|
|
cppcheck.keyword = ["error", "warning", "portability", "performance", "style"]
|
|
cppcheck.weight = [20, 10, 15, 15, 10]
|
|
dummy.comment = "\n\n### Details\n"
|
|
result-detail.exitstatus = true
|
|
result-detail.stderr = true
|
|
result-detail.time = false
|
|
result-detail.mem = false
|
|
|
|
[[stages]]
|
|
name = "Cpplint check"
|
|
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 ."
|
|
limit.stdout = 65
|
|
|
|
parsers = [ "cpplint", "dummy", "result-detail" ]
|
|
cpplint.keyword = [ "runtime", "readability", "build" ]
|
|
cpplint.weight = [ 10, 20, 15]
|
|
dummy.comment = "\n\n### Details\n"
|
|
result-detail.exitstatus = true
|
|
result-detail.stdout = true
|
|
result-detail.time = false
|
|
result-detail.mem = false
|
|
|
|
[[stages]]
|
|
name = "judge-base"
|
|
command="./driver ./mumsh"
|
|
limit.cpu = 3
|
|
limit.mem = 75
|
|
score = 10
|
|
|
|
parsers = ["diff", "dummy", "result-detail"]
|
|
dummy.comment = "\n\n### Details\n"
|
|
result-detail.exitstatus = true
|
|
result-detail.stderr = true
|
|
|
|
case4.score = 15
|
|
case4.limit.cpu = 30
|
|
case4.limit.mem = 10
|
|
case4.limit.stdout = 8
|
|
|
|
case5.score = 25
|
|
|
|
case8.limit.stderr = 128
|
|
|
|
[[stages]]
|
|
name = "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
|
|
score = 10
|
|
skip = ["case0", "case11"]
|
|
|
|
parsers = ["diff", "dummy", "result-detail"]
|
|
dummy.comment = "\n\n### Details\n"
|
|
result-detail.exitstatus = true
|
|
result-detail.stderr = true
|
|
|
|
case4.score = 15
|
|
case4.limit.cpu = 30
|
|
case4.limit.mem = 10
|
|
|
|
case5.diff.output.ignorespaces = false
|
|
|
|
case6.diff.output.hide = true
|