generated from reviewdog/action-template
-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
to-rdjsonl.jq
38 lines (38 loc) 路 808 Bytes
/
to-rdjsonl.jq
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{
source: {
name: "staticcheck",
url: "https://staticcheck.io"
},
message: .message,
code: {value: .code, url: "https://staticcheck.io/docs/checks#\(.code)"},
location: {
path: .location.file,
range: {
start: {
line: .location.line,
column: .location.column
},
end: {
line: .end.line,
column: .end.column
}
}
},
related_locations: (.related // {}) | map({
message: .message,
location: {
path: .location.file,
range: {
start: {
line: .location.line,
column: .location.column
},
end: {
line: .end.line,
column: .end.column
}
}
}
}),
severity: ((.severity|ascii_upcase|select(match("ERROR|WARNING|INFO")))//null)
}