forked from hannibal002/SkyHanni
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Linnea Gräf <[email protected]> Co-authored-by: hannibal2 <[email protected]> Co-authored-by: Cal <[email protected]>
- Loading branch information
1 parent
e90fd65
commit 092a29d
Showing
21 changed files
with
1,085 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: 'Setup Java, Gradle and check out the source code' | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Set up JDK 21 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 21 | ||
cache: gradle | ||
- name: Setup gradle | ||
uses: gradle/actions/setup-gradle@v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/bash | ||
|
||
# This script processes the Detekt SARIF file and outputs results in a format | ||
# suitable for annotation in CI/CD systems. | ||
|
||
SARIF_FILE="$1" | ||
|
||
# Check if SARIF file exists | ||
if [ ! -f "$SARIF_FILE" ]; then | ||
echo "SARIF file not found: $SARIF_FILE" | ||
exit 1 | ||
fi | ||
|
||
# Define jq command to parse SARIF file | ||
read -r -d '' jq_command <<'EOF' | ||
.runs[].results[] | | ||
{ | ||
"full_path": .locations[].physicalLocation.artifactLocation.uri | sub("file://$(pwd)/"; ""), | ||
"file_name": (.locations[].physicalLocation.artifactLocation.uri | split("/") | last), | ||
"l": .locations[].physicalLocation, | ||
"level": .level, | ||
"message": .message.text, | ||
"ruleId": .ruleId | ||
} | | ||
( | ||
"::" + (.level) + | ||
" file=" + (.full_path) + | ||
",line=" + (.l.region.startLine|tostring) + | ||
",title=" + (.ruleId) + | ||
",col=" + (.l.region.startColumn|tostring) + | ||
",endColumn=" + (.l.region.endColumn|tostring) + | ||
"::" + (.message.text) | ||
) | ||
EOF | ||
|
||
# Run jq command to format the output | ||
jq -r "$jq_command" < "$SARIF_FILE" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.