Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fourmolu #595

Merged
merged 4 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# SPDX-FileCopyrightText: 2024 Google LLC
#
# SPDX-License-Identifier: CC0-1.0
a4e4b4b8833acdc0d1f9c488d01e827a04598d98
9 changes: 9 additions & 0 deletions .github/scripts/fourmolu.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash
# SPDX-FileCopyrightText: 2024 Google LLC
#
# SPDX-License-Identifier: Apache-2.0
set -euf -o pipefail

git ls-files *.hs \
| grep --extended-regexp --invert-match '^clash-vexriscv/' \
| xargs --max-procs=0 -I {} fourmolu --quiet --mode inplace "{}"
43 changes: 24 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
run:
shell: git-nix-shell {0} --option connect-timeout 360 --pure --keep "GITHUB_SHA" --keep "S3_PASSWORD"
container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-08-06
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-08-07
options: --memory=11g
steps:
- name: Checkout
Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
shell: git-nix-shell {0} --option connect-timeout 360

container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-08-06
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-08-07
options: --memory=11g

steps:
Expand Down Expand Up @@ -104,7 +104,12 @@ jobs:

- name: Check that all cabal files are formatted correctly
run: |
.github/scripts/cabal-gild.sh check
.github/scripts/cabal-gild.sh
git diff --exit-code

- name: Check that all Haskell files are formatted correctly
run: |
.github/scripts/fourmolu.sh
git diff --exit-code

- name: Check that we don't introduce accidental infinite loops in type checkers
Expand All @@ -119,7 +124,7 @@ jobs:
shell: git-nix-shell {0} --option connect-timeout 360 --pure --keep "GITHUB_SHA" --keep "S3_PASSWORD"

container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-08-06
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-08-07
options: --memory=11g

steps:
Expand Down Expand Up @@ -159,7 +164,7 @@ jobs:
shell: git-nix-shell {0} --option connect-timeout 360 --pure --keep "GITHUB_OUTPUT"

container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-08-06
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-08-07
options: --memory=11g

steps:
Expand Down Expand Up @@ -199,7 +204,7 @@ jobs:
fail-fast: false

container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-08-06
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-08-07
options: --memory=11g

steps:
Expand Down Expand Up @@ -256,7 +261,7 @@ jobs:
]

container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-08-06
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-08-07
options: --memory=11g

steps:
Expand Down Expand Up @@ -329,7 +334,7 @@ jobs:
needs: [build, lint]

container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-08-06
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-08-07
options: --memory=11g

steps:
Expand All @@ -356,7 +361,7 @@ jobs:
needs: [build, lint]

container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-08-06
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-08-07
options: --memory=11g

steps:
Expand Down Expand Up @@ -397,7 +402,7 @@ jobs:
run:
shell: git-nix-shell {0} --option connect-timeout 360 --pure --keep "GITHUB_SHA" --keep "S3_PASSWORD"
container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-08-06
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-08-07
options: --memory=11g
needs: [build]

Expand All @@ -422,7 +427,7 @@ jobs:
run:
shell: git-nix-shell {0} --option connect-timeout 360 --pure --keep "GITHUB_SHA" --keep "S3_PASSWORD"
container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-08-06
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-08-07
options: --memory=11g
needs: [build]

Expand Down Expand Up @@ -450,7 +455,7 @@ jobs:
run:
shell: git-nix-shell {0} --option connect-timeout 360 --pure --keep "GITHUB_SHA" --keep "S3_PASSWORD"
container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-08-06
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-08-07
options: --memory=11g
needs: [build]

Expand All @@ -476,7 +481,7 @@ jobs:
run:
shell: git-nix-shell {0} --option connect-timeout 360 --pure --keep "GITHUB_SHA" --keep "S3_PASSWORD"
container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-08-06
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-08-07
options: --memory=11g
needs: [build]

Expand Down Expand Up @@ -509,7 +514,7 @@ jobs:
needs: [build, lint]

container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-08-06
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-08-07
options: --memory=11g

steps:
Expand All @@ -536,7 +541,7 @@ jobs:
needs: [build, lint]

container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-08-06
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-08-07
options: --memory=11g

steps:
Expand All @@ -562,7 +567,7 @@ jobs:
shell: git-nix-shell {0} --option connect-timeout 360 --pure --keep "GITHUB_OUTPUT"

container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-08-06
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-08-07
options: --memory=11g

steps:
Expand Down Expand Up @@ -595,7 +600,7 @@ jobs:
shell: git-nix-shell {0} --option connect-timeout 360 --pure --keep "GITHUB_OUTPUT"

container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-08-06
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-08-07
options: --memory=11g

steps:
Expand Down Expand Up @@ -643,7 +648,7 @@ jobs:
fail-fast: false

container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-08-06
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-08-07
volumes:
- /opt/tools:/opt/tools
options: --init --mac-address="6c:5a:b0:6c:13:0b" --memory=11g
Expand Down Expand Up @@ -723,7 +728,7 @@ jobs:
fail-fast: false

container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-08-06
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-08-07
volumes:
- /opt/tools:/opt/tools
- /dev:/dev
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"files.trimTrailingWhitespace": true,
"editor.rulers": [
80,
100
90
],
"editor.tabSize": 2,
"[rust]": {
Expand Down
Loading
Loading