Skip to content

Commit

Permalink
Make formatting script work with ormolu
Browse files Browse the repository at this point in the history
  • Loading branch information
asterite committed Aug 7, 2019
1 parent 0548ce5 commit 7bbc8d9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 18 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ stack build
stack test
```

Run `./script/hindent.sh` to format everything correctly.
Run `./script/format.sh` to format everything correctly.
14 changes: 14 additions & 0 deletions script/format.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

set -euo pipefail
IFS=$'\n\t'

DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "${DIR}/.."
# End Boilerplate

# Get a list of all haskell files and pass them through ormolu.
git ls-files '*.hs' -z | xargs -0 -I {} ormolu --mode inplace {};

# Expect no changes in the working directory. Complain if there are any.
git diff --exit-code;
17 changes: 0 additions & 17 deletions script/hindent.sh

This file was deleted.

0 comments on commit 7bbc8d9

Please sign in to comment.