aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/build.yml
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-09-19 21:15:37 +0200
committerLinnea Gräf <nea@nea.moe>2024-09-19 21:15:37 +0200
commitab19e365c1962db5d94b2cc713ab9216024fc80d (patch)
treeb6063fd089282c5c71cb093e50a01c540ce04c0c /.github/workflows/build.yml
parent3724cbcfd774bae43f6fc3ac3f561922fcb2a5fa (diff)
downloadskyhanni-ab19e365c1962db5d94b2cc713ab9216024fc80d.tar.gz
skyhanni-ab19e365c1962db5d94b2cc713ab9216024fc80d.tar.bz2
skyhanni-ab19e365c1962db5d94b2cc713ab9216024fc80d.zip
Add inline warning and errors to github actions
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: