Compare commits

...

No commits in common. "keyword/script" and "master" have entirely different histories.

7 changed files with 3 additions and 72 deletions

1
.gitignore vendored
View File

@ -1 +0,0 @@
joj3_result.json

3
README.md Normal file
View File

@ -0,0 +1,3 @@
# JOJ3 examples
Check other branches.

View File

@ -1,63 +0,0 @@
{
"stage": {
"stages": [
{
"name": "keyword",
"executor": {
"name": "sandbox",
"with": {
"default": {
"args": [
"bash",
"-c",
". ./src/lib.sh; check_files ./src/assets"
],
"env": [
"PATH=/usr/bin:/bin:/usr/local/bin"
],
"cpuLimit": 10000000000,
"memoryLimit": 104857600,
"procLimit": 50,
"copyInDir": ".",
"copyOut": [
"stdout",
"stderr"
],
"stdin": {
"content": ""
},
"stdout": {
"name": "stdout",
"max": 65536
},
"stderr": {
"name": "stderr",
"max": 65536
}
}
}
},
"parsers": [
{
"name": "keyword",
"with": {
"score": 100,
"files": [
"stdout"
],
"forceQuitOnDeduct": true,
"matches": [
{
"keywords": [
"check files error"
],
"score": 5
}
]
}
}
]
}
]
}
}

View File

@ -1 +0,0 @@
[{"name":"keyword","results":[{"score":95,"comment":"1. `check files error`: 1 occurrence(s), -5 point(s)\n"}],"force_quit":true}]

View File

View File

View File

@ -1,7 +0,0 @@
# count file number in a given directory
function check_files() {
file_count=$(find $1 -type f | wc -l)
if [ $file_count -ge 1 ]; then
echo "check files error: more than 1 file found in $1!"
fi
}