@@ -52,19 +52,20 @@ jobs:
52
52
name : recommendations_python_${{ matrix.os }}
53
53
path : code-guru/
54
54
55
- - name : Print Summary of Findings Linux
55
+ - name : Print Summary of Findings ${{ matrix.os }}
56
56
if : steps.iam-role.outcome == 'success'
57
+ if : matrix.os != 'windows-latest' # cat and jq don't work the same way on windows
57
58
run : |
58
59
echo "detector,filePath,lineNumber" > summary-of-results.csv
59
60
jq -r '.runs[0].results[] | {ruleId: .ruleId, firstFile: .locations[0].physicalLocation.artifactLocation.uri, firstLine: .locations[0].physicalLocation.region.startLine} | join(",")' \
60
61
code-guru/recommendations.sarif.json | sort >> summary-of-results.csv
61
62
cat summary-of-results.csv
62
63
63
- - name : Validate Findings Linux
64
+ - name : Validate Findings ${{ matrix.os }}
64
65
if : steps.iam-role.outcome == 'success'
65
66
shell : bash
66
67
env :
67
- EXPECTED : 112
68
+ EXPECTED : 98
68
69
run : |
69
70
[[ $(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; }
70
71
@@ -129,15 +130,15 @@ jobs:
129
130
name : recommendations_java_${{ matrix.os }}
130
131
path : code-guru/
131
132
132
- - name : Print Summary of Findings Linux
133
+ - name : Print Summary of Findings ${{ matrix.os }}
133
134
if : steps.iam-role.outcome == 'success'
134
135
run : |
135
136
echo "detector,filePath,lineNumber" > summary-of-results.csv
136
137
jq -r '.runs[0].results[] | {ruleId: .ruleId, firstFile: .locations[0].physicalLocation.artifactLocation.uri, firstLine: .locations[0].physicalLocation.region.startLine} | join(",")' \
137
138
code-guru/recommendations.sarif.json | sort >> summary-of-results.csv
138
139
cat summary-of-results.csv
139
140
140
- - name : Validate Findings Linux
141
+ - name : Validate Findings ${{ matrix.os }}
141
142
if : steps.iam-role.outcome == 'success'
142
143
shell : bash
143
144
env :
0 commit comments