Update uncrustify usage in README
This commit is contained in:
parent
59c0d094e3
commit
f7105a747e
|
@ -7,4 +7,4 @@ This project uses PlatformIO. Quick setup guide:
|
|||
- To compile, run `pio run`
|
||||
- To compile and upload, run `pio run -t upload`
|
||||
- To run clang-tidy, run `pio check`.
|
||||
- Please run `uncrustify --no-backup -c .uncrustify.cfg src/*.cpp include/*.h` before commiting. To install it as a pre-commit hook, run `ln -s ../../hooks/pre-commit.hook ../.git/hooks/pre-commit` in this directory.
|
||||
- Please run `./scripts/uncrustify.sh` before commiting. To install it as a pre-commit hook, run `ln -s ../../hooks/pre-commit.hook ../.git/hooks/pre-commit` in this directory.
|
||||
|
|
6
scripts/uncrustify.sh
Normal file
6
scripts/uncrustify.sh
Normal file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
script=$(realpath "$0")
|
||||
scripts_root=$(dirname "$script")
|
||||
project_root=$(dirname "$scripts_root")
|
||||
tgt="$project_root/AfRApay.MateCard"
|
||||
find "$tgt" -type f -path "$tgt/src/*.cpp" -or -path "$tgt/include/*.h" | uncrustify --no-backup -c "$tgt/.uncrustify.cfg" -F -
|
Loading…
Reference in a new issue