Skip to content

a start for pwd

a start for pwd #78

Workflow file for this run

on:
workflow_dispatch:
pull_request:
branches: [ main ]
push:
branches: [ main ]
paths:
- "**.c"
- "**.h"
- ".github/workflows/fmt-check.yml"
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
with:
nix_path: nixpkgs=channel:nixos-unstable
- run: |
nix build nixpkgs#clang-tools
find . -type f -name "*.c" -or -name "*.h" \
| xargs -i ./result/bin/clang-format -i {}
out=$(git status \
| grep "modified" \
| cut -d ":" -f 2 \
| sort \
| xargs \
| tee /dev/stderr \
| wc -c)
[ $out -gt 1 ] && exit 1 || exit 0