Handle Malformed Local Codacy JSON
Use this when analyze-local.sh writes a local-*.json file but jq cannot
parse it.
- Verify the dump before reading it as findings:
jq empty .local/audits/codacy/local-*.json
- If parsing fails, inspect the first lines:
sed -n '1,80p' .local/audits/codacy/local-*.json
Treat tool-runner logs as a local-analysis failure, not as Codacy findings. A known failure mode is a Dockerized tool trying to read
/.codacyrcas a file and reportingread /.codacyrc: is a directory.Check GitHub check-run annotations:
gh api repos/netdata/netdata/check-runs/<CHECK_RUN_ID>/annotations --paginate
- If annotations are empty, fetch PR issues through the Codacy API:
.agents/skills/codacy-audit/scripts/pr-issues.sh <PR_NUMBER>
- If
CODACY_TOKENis not configured, record that Codacy details are not locally available and re-check after the next push.