Skip to content

Commit

Permalink
Simply analysis result printing (#55)
Browse files Browse the repository at this point in the history
* Update runexamples.yml

* Update entrypoint.sh

* Update README.md
  • Loading branch information
xinshiMSFT authored May 8, 2023
1 parent 74342a0 commit da7963d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/runexamples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
binary-path: 'Examples'

- name: Infer# analysis results
run: echo "${{ steps.runinfersharp.outputs.results }}"
run: cat infer-out/report.txt

- name: Upload Infer# report as an artifact
uses: actions/upload-artifact@v2
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
### Option 1 - Uploading [SARIF](https://docs.github.com/en/code-security/code-scanning/integrating-with-code-scanning/sarif-support-for-code-scanning) output to GitHub
```yml
- name: Run Infer#
uses: microsoft/infersharpaction@v1.4
uses: microsoft/infersharpaction@v1.4.1
id: runinfersharp
with:
binary-path: '<path to the binary directory containing .dlls and .pdbs>'
Expand All @@ -25,19 +25,19 @@ For all supported features, please see GitHub Docs on [managing alerts](https://
### Option 2 - Displaying results directly in workflow logs
```yml
- name: Run Infer#
uses: microsoft/infersharpaction@v1.4
uses: microsoft/infersharpaction@v1.4.1
id: runinfersharp
with:
binary-path: '<path to the binary directory containing .dlls and .pdbs>'

- name: Infer# analysis results
run: echo "${{ steps.runinfersharp.outputs.results }}"
run: cat infer-out/report.txt
```
### Option 3 - Uploading results as an artifact
```yml
- name: Run Infer#
uses: microsoft/infersharpaction@v1.4
uses: microsoft/infersharpaction@v1.4.1
id: runinfersharp
with:
binary-path: '<path to the binary directory containing .dlls and .pdbs>'
Expand Down
7 changes: 0 additions & 7 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,3 @@ curl -o .inferconfig https://raw.githubusercontent.com/microsoft/infersharp/v1.4
chmod +x run_infersharp.sh
chmod +x .inferconfig
./run_infersharp.sh "$1" $2

results="$( cat infer-out/report.txt )"
results="${results//'"'/''}"
results="${results//'%'/'%25'}"
results="${results//$'\n'/'%0A'}"
results="${results//$'\r'/'%0D'}"
echo "results=$result" >> $env:GITHUB_OUTPUT

0 comments on commit da7963d

Please sign in to comment.