-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Use HLint action for CI * Split linting and styling, use Fourmolu
- Loading branch information
Showing
6 changed files
with
60 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Linting | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: ["main", "development"] | ||
|
||
jobs: | ||
hlint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: 'Set up HLint' | ||
uses: rwe/actions-hlint-setup@v1 | ||
with: | ||
version: '3.3.6' | ||
|
||
- name: 'Run HLint' | ||
uses: rwe/actions-hlint-run@v1 | ||
with: | ||
path: '["src/", "test/"]' | ||
fail-on: warning | ||
|
||
styling: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Configure environment | ||
|
||
- name: Set up Haskell | ||
id: setup-haskell | ||
uses: haskell/actions/setup@v1 | ||
with: | ||
ghc-version: "8.10.7" | ||
cabal-version: "latest" | ||
|
||
|
||
- name: Install tools | ||
run: | | ||
cd ~/ | ||
echo "$HOME/.ghcup/bin" >> $GITHUB_PATH | ||
echo "$HOME/.cabal/bin" >> $GITHUB_PATH | ||
echo "$HOME/.local/bin" >> $GITHUB_PATH | ||
cabal install -j fourmolu | ||
- name: Running fourmolu | ||
run: ./.github/workflows/fourmolu-runner.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
indentation: 2 | ||
comma-style: leading # for lists, tuples etc. - can also be 'leading' | ||
import-export-comma-style: leading # for module import export lists - can also be 'leading' | ||
record-brace-space: false # rec {x = 1} vs. rec{x = 1} | ||
indent-wheres: true # 'false' means save space by only half-indenting the 'where' keyword | ||
diff-friendly-import-export: false # 'false' uses Ormolu-style lists | ||
respectful: true # don't be too opinionated about newlines etc. | ||
haddock-style: multi-line # '--' vs. '{-' | ||
newlines-between-decls: 1 # number of newlines between top-level declarations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters