fmt-check

This commit is contained in:
Alex Janka 2024-08-23 09:52:41 +10:00
parent ae31892358
commit 5427ea05a8
3 changed files with 10 additions and 6 deletions

View file

@ -4,3 +4,9 @@
entry: cargo-lock-updater
language: script
types: [text]
- id: fmt-check
name: Check formatting
description: Runs make fmt-check
entry: fmt-check
language: script
types: [text]

View file

@ -4,9 +4,3 @@ find . -type f -name 'Cargo.lock' -print0 | while IFS=$'\0' read -r -d '' file;
(cd "$(dirname "$file")" && cargo update -wq)
git add $file
done
if [ -f "Makefile" ]; then
if [ ! -z $(grep "fmt-check:" "Makefile") ]; then
make fmt-check 2>&1 >/dev/null
fi
fi

4
fmt-check Executable file
View file

@ -0,0 +1,4 @@
#!/usr/bin/env zsh
if [ ! -z $(grep "fmt-check:" "Makefile") ]; then
make fmt-check 2>/dev/null
fi