autoformat cabal file (#1769)

Closes #1709.
This commit is contained in:
Karl Ostmo 2024-02-19 12:07:15 -08:00 committed by GitHub
parent 9253b0eb94
commit e851f445a8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 860 additions and 763 deletions

24
.github/workflows/normalize-cabal.yml vendored Normal file
View File

@ -0,0 +1,24 @@
name: Normalize cabal file formatting
on:
push:
paths:
- '**.hs'
- '**.cabal'
branches:
- main
pull_request:
paths:
- '**.hs'
- '**.cabal'
branches:
- main
jobs:
gild:
name: Normalize cabal
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: tfausak/cabal-gild-setup-action@v1
with:
version: 0.3.0.1
- run: cabal-gild --input swarm.cabal --mode check

7
scripts/normalize-cabal.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/bash -ex
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
cd $SCRIPT_DIR/..
CABAL_FILE=swarm.cabal
cabal-gild --input $CABAL_FILE --output $CABAL_FILE --mode format

File diff suppressed because it is too large Load Diff