aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/build.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/build.yml')
-rw-r--r--.github/workflows/build.yml20
1 files changed, 20 insertions, 0 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 7c12349e9..d1af96882 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -43,6 +43,26 @@ jobs:
- name: Run detekt
run: |
./gradlew detekt --stacktrace
+ - name: Annotate detekt failures
+ run: |
+ read -r -d '' jq_command <<'EOF'
+ .runs[].results[] |
+ {
+ "l": .locations[].physicalLocation,
+ "level": .level,
+ "message":.message,
+ "ruleId":.ruleId
+ } |
+ (
+ "::" + (.level) +
+ " file=" + ( .l.artifactLocation.uri | sub("file://$(pwd)/"; ""))
+ + ",line=" + (.l.region.startLine|tostring)
+ + ",endLine=" + (.l.region.endLine|tostring)
+ + ",col=" + (.l.region.startColumn|tostring)
+ + ",endColumn=" + (.l.region.endColumn|tostring)
+ + ",title=" + (.ruleId) + "::" + (.message.text))
+ EOF
+ jq -r "$jq_command" < versions/1.8.9/build/reports/detekt/detekt.sarif
preprocess: