Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
evmar committed Sep 15, 2024
1 parent 8b707d5 commit 7b525ec
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion HACKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ $ sudo apt install libsdl2-dev

## CLI build

Build/run the CLI app:
Build/run the CLI app:

```
$ cargo build -p retrowin32 -F x86-emu,sdl --profile=lto
Expand Down
14 changes: 11 additions & 3 deletions misc/fmt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,26 @@

# Run all code formatters.

set -Ee
set -e

# Look for dprint from npm and in $HOME for CI.
for path in web/node_modules/.bin/dprint $HOME/.dprint/dprint dprint; do
dprint=$path
if [ -f $dprint ]; then
break
fi
done

if [ "$1" = "--check" ]; then
if ! (
cargo fmt -- --check &&
web/node_modules/.bin/dprint check
$dprint check
); then
echo
echo "error: formatting check failed; run 'misc/fmt.sh' to fix"
exit 1
fi
else
cargo fmt
web/node_modules/.bin/dprint fmt
$dprint fmt
fi

0 comments on commit 7b525ec

Please sign in to comment.