Skip to content

Merge pull request #10 from egurapha/nix-flake #49

Merge pull request #10 from egurapha/nix-flake

Merge pull request #10 from egurapha/nix-flake #49

name: Code Formatting
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
format-check:
runs-on: ubuntu-latest
steps:
- name: Checkout.
uses: actions/checkout@v4
- name: Install shfmt.
run: sudo apt-get update && sudo apt-get install -y shfmt
- name: Check Formatting.
run: |
shfmt -d -i 4 -ci -s . > shfmt-diff.txt
if [[ -s shfmt-diff.txt ]]; then
echo "Code is not Formatted Correctly:"
cat shfmt-diff.txt
exit 1
fi
- name: Success.
if: success()
run: echo "Code Formatting Passed."
- name: Failure.
if: failure()
run: echo "Code Formatting Failed."