Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ Open a pull request against the main
repo.

> **Note**
> It is recommended to run [pre-commit script](scripts/precommit.sh) from the root of
the repo to catch any issues locally.
> It is recommended to run [pre-commit script](scripts/precommit.sh) to catch any issues locally.

### How to Receive Comments

Expand Down
8 changes: 7 additions & 1 deletion scripts/precommit.sh
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
cargo update && cargo fmt --all && ./scripts/lint.sh && ./scripts/test.sh
REPO_ROOT=$(dirname $( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ))

pushd "${REPO_ROOT}" > /dev/null

cargo update && cargo fmt --all && ./scripts/lint.sh && ./scripts/test.sh

popd > /dev/null