Skip to content

Commit

Permalink
fix: skip detekt check if there are no changed Kotlin files
Browse files Browse the repository at this point in the history
  • Loading branch information
joc-a committed Jul 20, 2023
1 parent b42a471 commit 9f4fc85
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/detekt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ jobs:
# Runs detekt on changed files
- name: "run-detekt"
run: |
if [ -z "$CHANGED_FILES" ]
then
echo "No changed Kotlin files found."
exit 0
fi
echo "Running detekt check..."
DETEKT_ISSUES=$(detekt-cli --build-upon-default-config --config detekt/detekt-config.yml --plugins detekt/detekt-formatting-1.21.0.jar --input $CHANGED_FILES)
if [ -n "$DETEKT_ISSUES" ]; then
Expand Down

0 comments on commit 9f4fc85

Please sign in to comment.