From 8a8b552cbbdf0328ea47fa1b78c01726ae373ab4 Mon Sep 17 00:00:00 2001 From: Florian FOURATIER <6524406+flhorizon@users.noreply.github.com> Date: Fri, 19 Aug 2022 17:35:33 +0200 Subject: [PATCH] feat: wrapper script for stylish-haskell --- scripts/format-all.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 scripts/format-all.sh diff --git a/scripts/format-all.sh b/scripts/format-all.sh new file mode 100755 index 0000000..e5e6811 --- /dev/null +++ b/scripts/format-all.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# stack install stylish-haskell +# or grab a release at https://github.com/haskell/stylish-haskell/releases + +src_dir="$(realpath $(dirname $0))/.." +config_file="${src_dir}/.stylish-haskell.yaml" +dirs="$(echo ${src_dir}/{benchmarks,src,test})" + +stylish-haskell \ + --config "$config_file" \ + --inplace \ + --verbose \ + $(find ${dirs} -type f -name '*.hs')