Skip to content

Commit

Permalink
formatting script
Browse files Browse the repository at this point in the history
  • Loading branch information
KommuSoft committed Aug 15, 2024
0 parents commit c681543
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions format.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

format () {
pat="$1"
shift
if git ls-files --error-unmatch "$pat"; then
git ls-files "$pat" | xargs "$@"
fi
}

format '*.py' python -m isort
format '*.py' python -m black -- -S -q
format '*.hs' ormolu

0 comments on commit c681543

Please sign in to comment.