#!/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')"