JetBrains / ReSharper-InspectCode

C# static analysis on GitHub Actions using JetBrains ReSharper InspectCode.
Other
16 stars 1 forks source link

Inspect Code step fails to upload results when no code issues exist #2

Closed YourGirlInSpace closed 1 year ago

YourGirlInSpace commented 1 year ago

Re: https://github.com/YourGirlInSpace/Instar/actions/runs/5313954072/jobs/9620628525

Error: Invalid SARIF. Missing 'results' array in run.
    at countResultsInSarif (/home/runner/work/_actions/github/codeql-action/v2/lib/upload-lib.js:171:19)
    at uploadFiles (/home/runner/work/_actions/github/codeql-action/v2/lib/upload-lib.js:269:30)
    at async Object.uploadFromActions (/home/runner/work/_actions/github/codeql-action/v2/lib/upload-lib.js:137:12)
    at async run (/home/runner/work/_actions/github/codeql-action/v2/lib/upload-sarif-action.js:48:30)
    at async runWrapper (/home/runner/work/_actions/github/codeql-action/v2/lib/upload-sarif-action.js:70:9)

When no code issues exist, it seems that results does not exist which causes the workflow to fail.

derigel23 commented 1 year ago

@YourGirlInSpace That's a bug not in GitHub Action but in R# CLI tool itself. I've filed an issue in our tracker RSRP-492822

YourGirlInSpace commented 1 year ago

Interesting, good to know! As a mitigation, I will disable this workflow on my repo until the bug is resolved. Thanks!

YourGirlInSpace commented 1 year ago

Hi @derigel23, I see that RSRP-492822 has been marked as fixed. Is there anything remaining to do on ReShaper-InspectCode for this fix to be operational?

derigel23 commented 1 year ago

@YourGirlInSpace you need to specify tool-version: 2023.2.0-EAP06 in the workflow file.