Skip to content

Commit 5620dda

Browse files
committed
[PLUTO-1431] fx
1 parent 3023381 commit 5620dda

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

plugins/tools/revive/test/src/bad.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ func BadFunction(a int, b int, c int, d int, e int) int {
99
var foo int = 42 // magic number
1010
if foo == 42 {
1111
fmt.Println("foo is 42")
12-
return
12+
return 56
1313
}
1414
return foo
1515
}

run-tool-tests.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ normalize_paths() {
2424
sort_sarif() {
2525
local input=$1
2626
local output=$2
27-
jq --sort-keys 'if .runs[0].tool.driver.rules == null then . else .runs[0].tool.driver.rules |= sort_by(.id) end' "$input" > "$output"
27+
jq --sort-keys '
28+
if .runs[0].tool.driver.rules == null then . else .runs[0].tool.driver.rules |= sort_by(.id) end
29+
| .runs[0].results |= sort_by(.ruleId, .message.text, .locations[0].physicalLocation.region.startLine, .locations[0].physicalLocation.region.startColumn)
30+
' "$input" > "$output"
2831
}
2932

3033
# Check if tool name is provided

0 commit comments

Comments
 (0)