@@ -52,19 +52,20 @@ jobs:
5252 name : recommendations_python_${{ matrix.os }}
5353 path : code-guru/
5454
55- - name : Print Summary of Findings Linux
55+ - name : Print Summary of Findings ${{ matrix.os }}
5656 if : steps.iam-role.outcome == 'success'
57+ if : matrix.os != 'windows-latest' # cat and jq don't work the same way on windows
5758 run : |
5859 echo "detector,filePath,lineNumber" > summary-of-results.csv
5960 jq -r '.runs[0].results[] | {ruleId: .ruleId, firstFile: .locations[0].physicalLocation.artifactLocation.uri, firstLine: .locations[0].physicalLocation.region.startLine} | join(",")' \
6061 code-guru/recommendations.sarif.json | sort >> summary-of-results.csv
6162 cat summary-of-results.csv
6263
63- - name : Validate Findings Linux
64+ - name : Validate Findings ${{ matrix.os }}
6465 if : steps.iam-role.outcome == 'success'
6566 shell : bash
6667 env :
67- EXPECTED : 112
68+ EXPECTED : 98
6869 run : |
6970 [[ $(jq -r '.runs[0].results[].ruleId' code-guru/recommendations.sarif.json | wc -l) -eq $EXPECTED ]] || { echo "Expected $EXPECTED recommendations but got $(jq -r '.runs[0].results[].ruleId' code-guru/recommendations.sarif.json | wc -l)"; exit 1; }
7071
@@ -129,15 +130,15 @@ jobs:
129130 name : recommendations_java_${{ matrix.os }}
130131 path : code-guru/
131132
132- - name : Print Summary of Findings Linux
133+ - name : Print Summary of Findings ${{ matrix.os }}
133134 if : steps.iam-role.outcome == 'success'
134135 run : |
135136 echo "detector,filePath,lineNumber" > summary-of-results.csv
136137 jq -r '.runs[0].results[] | {ruleId: .ruleId, firstFile: .locations[0].physicalLocation.artifactLocation.uri, firstLine: .locations[0].physicalLocation.region.startLine} | join(",")' \
137138 code-guru/recommendations.sarif.json | sort >> summary-of-results.csv
138139 cat summary-of-results.csv
139140
140- - name : Validate Findings Linux
141+ - name : Validate Findings ${{ matrix.os }}
141142 if : steps.iam-role.outcome == 'success'
142143 shell : bash
143144 env :
0 commit comments