From 235d1980bb55c8ec231ab03933cf8e8335344b81 Mon Sep 17 00:00:00 2001 From: BoYanZh Date: Thu, 19 Sep 2024 17:07:30 -0400 Subject: [PATCH] feat: use conf.json --- conf.json | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ conf.toml | 35 ---------------------------- 2 files changed, 68 insertions(+), 35 deletions(-) create mode 100644 conf.json delete mode 100644 conf.toml diff --git a/conf.json b/conf.json new file mode 100644 index 0000000..b299a7b --- /dev/null +++ b/conf.json @@ -0,0 +1,68 @@ +{ + "stages": [ + { + "name": "clangtidy", + "executor": { + "name": "sandbox", + "with": { + "default": { + "args": [ + "bash", + "-c", + "cmake -S . -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -B build && clang-tidy-18 --header-filter=.* --quiet -checks=* src/*.cpp -p build" + ], + "env": [ + "PATH=/usr/bin:/bin:/usr/local/bin" + ], + "cpuLimit": 10000000000, + "memoryLimit": 419430400, + "procLimit": 50, + "copyInCwd": true, + "copyOut": [ + "stdout" + ], + "stdin": { + "content": "" + }, + "stdout": { + "name": "stdout", + "max": 65536 + }, + "stderr": { + "name": "stderr", + "max": 65536 + } + } + } + }, + "parser": { + "name": "clangtidy", + "with": { + "score": 100, + "rootdir": "/w", + "matches": [ + { + "keyword": [ + "cppcoreguidelines-avoid-non-const-global-variables" + ], + "score": 5 + }, + { + "keyword": [ + "readability-identifier-length", + "misc-use-anonymous-namespace" + ], + "score": 2 + }, + { + "keyword": [ + "llvmlibc-implementation-in-namespace" + ], + "score": 1 + } + ] + } + } + } + ] +} diff --git a/conf.toml b/conf.toml deleted file mode 100644 index e24ceb9..0000000 --- a/conf.toml +++ /dev/null @@ -1,35 +0,0 @@ -skipGitea = true -[[stages]] -name = "clangtidy" -[stages.executor] -name = "sandbox" -[stages.executor.with.default] -args = ["bash", "-c", "cmake -S . -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -B build && clang-tidy-18 --header-filter=.* --quiet -checks=* src/*.cpp -p build"] -env = ["PATH=/usr/bin:/bin:/usr/local/bin"] -cpuLimit = 10_000_000_000 -memoryLimit = 419_430_400 -procLimit = 50 -copyInCwd = true -copyOut = ["stdout"] -[stages.executor.with.default.stdin] -content = "" -[stages.executor.with.default.stdout] -name = "stdout" -max = 65_536 -[stages.executor.with.default.stderr] -name = "stderr" -max = 65_536 -[stages.parser] -name = "clangtidy" -[stages.parser.with] -score = 100 -rootdir = "/w" -[[stages.parser.with.matches]] -keyword = ["cppcoreguidelines-avoid-non-const-global-variables"] -score = 5 -[[stages.parser.with.matches]] -keyword = ["readability-identifier-length","misc-use-anonymous-namespace"] -score = 2 -[[stages.parser.with.matches]] -keyword = ["llvmlibc-implementation-in-namespace"] -score = 1