Skip to content

Commit

Permalink
Skip pre commit if there are no .dart files changed
Browse files Browse the repository at this point in the history
  • Loading branch information
LuisDuarte1 committed Jul 27, 2023
1 parent ceca3b0 commit f9b8164
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pre-commit-hook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ tee .git/hooks/pre-commit << EOF
FILES="\$(git diff --name-only --cached | grep .*\.dart | grep -v .*\.g\.dart)"
[ -z "\$FILES" ] && exit 0
echo "\$FILES" | xargs dart format
Expand Down

0 comments on commit f9b8164

Please sign in to comment.