diff options
| author | Andrew Dolgov <fox@fakecake.org> | 2026-05-26 08:39:07 +0300 |
|---|---|---|
| committer | Andrew Dolgov <fox@fakecake.org> | 2026-05-26 08:39:07 +0300 |
| commit | 1cea8a710a8dffd9f8286c3b7e46a9379841e2b4 (patch) | |
| tree | 72d4be3525a2390eeec3eb0188d750b85b3c2766 /utils | |
| parent | dc60880d9cc4074a231fd21c9508d0f78beaf1f1 (diff) | |
| download | the-epube-1cea8a710a8dffd9f8286c3b7e46a9379841e2b4.tar.gz the-epube-1cea8a710a8dffd9f8286c3b7e46a9379841e2b4.tar.xz | |
import integration test scaffold from tt-rss
Diffstat (limited to 'utils')
| -rw-r--r-- | utils/show-codequality.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/utils/show-codequality.sh b/utils/show-codequality.sh new file mode 100644 index 0000000..7cbef47 --- /dev/null +++ b/utils/show-codequality.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +FILE="${1:-gl-codequality.json}" + +if [ ! -f "$FILE" ]; then + echo "Error: $FILE not found" + exit 1 +fi + +COUNT=$(jq 'length' "$FILE") + +if [ "$COUNT" -eq 0 ]; then + echo "No issues found." + exit 0 +fi + +echo "Found $COUNT issue(s):" +echo "" + +jq -r '.[] | + [.location.path, + (.location.positions.begin.line | tostring), + (.location.positions.begin.column | tostring), + .severity, + .check_name, + .description | gsub("\\n"; "") ] | + @tsv' "$FILE" | column -t -s "$(printf '\t')" |
