From d120f5e45a146a239139d9e1c0c1a2d41d81e436 Mon Sep 17 00:00:00 2001 From: Hydraallen Date: Fri, 3 May 2024 22:02:40 +0800 Subject: [PATCH] feat: json --- expected.json | 30 +++++++++++++++++++----------- stdin.sh | 2 +- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/expected.json b/expected.json index f3dab89..25045c6 100644 --- a/expected.json +++ b/expected.json @@ -8,24 +8,32 @@ }, { "name of check": "forbiddenFile", - "stdout": "Checking forbidden files: OK", - "exit code": 0, + "stdout": "Checking forbidden files: Failed", + "exit code": 1, "stderr": "", - "errorLog": null + "errorLog": { + "Op": "lstat", + "Path": "./examples/healthcheck/asciimsg", + "Err": 2 + } }, { "name of check": "metaFile", - "stdout": "Checking the existence of meta file: OK", - "exit code": 0, + "stdout": "Checking the existence of meta file: ", + "exit code": 1, "stderr": "", - "errorLog": null + "errorLog": {} }, { - "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": "NonAsciiFiles", + "stdout": "Checking for non-ascii files: Failed", + "exit code": 1, + "stderr": "", + "errorLog": { + "Op": "lstat", + "Path": "./examples/healthcheck/asciimsg", + "Err": 2 + } }, { "name of check": "NonAsciiMsg", diff --git a/stdin.sh b/stdin.sh index db2aa0f..b1d4530 100644 --- a/stdin.sh +++ b/stdin.sh @@ -1,3 +1,3 @@ #!bash -./build/healthcheck -root=./examples/healthcheck/asciifile -whitelist=".*\.md" -whitelist=".*\.json" -whitelist=".*\.sh" -whitelist=".git.*" -whitelist=".*\.txt" +./build/healthcheck -root=./examples/healthcheck/asciimsg -whitelist=".*\.md" -whitelist=".*\.json" -whitelist=".*\.sh" -whitelist=".git.*" -whitelist=".*\.txt"