From dc13cbecb0ebffa0f100b782bbca71c6bb1d9314 Mon Sep 17 00:00:00 2001 From: zzjc1234 <2359047351@qq.com> Date: Wed, 10 Apr 2024 19:06:36 +0800 Subject: [PATCH] feat: expected out for asciifile check --- expected.json | 74 +++++++++++++++++++++++++-------------------------- stdin.sh | 2 +- 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/expected.json b/expected.json index b5ef4e0..740de39 100644 --- a/expected.json +++ b/expected.json @@ -1,37 +1,37 @@ -[ - { - "name of check": "RepoSize", - "stdout": "Checking repository size: OK", - "exit code": 0, - "stderr": "", - "errorLog": null - }, - { - "name of check": "forbiddenFile", - "stdout": "Checking forbidden files: OK", - "exit code": 0, - "stderr": "", - "errorLog": null - }, - { - "name of check": "metaFile", - "stdout": "Checking the existence of meta file: OK", - "exit code": 0, - "stderr": "", - "errorLog": null - }, - { - "name of check": "NonAsciiFiles", - "stdout": "Checking for non-ascii files: OK", - "exit code": 0, - "stderr": "", - "errorLog": null - }, - { - "name of check": "NonAsciiMsg", - "stdout": "Checking for non-ASCII characters in commit message: OK", - "exit code": 0, - "stderr": "", - "errorLog": null - } -] \ No newline at end of file + +[{ + "name of check" : "RepoSize", + "stdout" : "Checking repository size: OK", + "exit code" : 0, + "stderr" : "", + "errorLog" : null +}, + { + "name of check" : "forbiddenFile", + "stdout" : "Checking forbidden files: OK", + "exit code" : 0, + "stderr" : "", + "errorLog" : null + }, + { + "name of check" : "metaFile", + "stdout" : "Checking the existence of meta file: OK", + "exit code" : 0, + "stderr" : "", + "errorLog" : null + }, + { + "name of check" : "NonAsciiFiles", + "stdout" : "Checking for non-ascii files: Failed", + "exit code" : 1, + "stderr" : "Non-ASCII characters found in the following " + "files:\n\texamples/repohealth/asciifile/nonascii.txt", + "errorLog" : null + }, + { + "name of check" : "NonAsciiMsg", + "stdout" : "Checking for non-ASCII characters in commit message: OK", + "exit code" : 0, + "stderr" : "", + "errorLog" : null + }] diff --git a/stdin.sh b/stdin.sh index 0ad844f..c7736d2 100644 --- a/stdin.sh +++ b/stdin.sh @@ -1,3 +1,3 @@ #!bash -./build/healthcheck -root=./examples/repohealth/asciifile -meta=readme -whitelist=.*\.md -whitelist=.*\.json -whitelist=.*\.sh -whitelist=.git.* -whitelist=.*\.txt +./build/healthcheck -root=./examples/repohealth/asciifile -whitelist=.*\.md -whitelist=.*\.json -whitelist=.*\.sh -whitelist=.git.* -whitelist=.*\.txt