Skip to content

Commit

Permalink
❤️(🦶): add fmt_n_check.sh for code formatting and checking
Browse files Browse the repository at this point in the history
This new script, fmt_n_check.sh, handles code formatting and error checking before committing changes. It includes features such as checking wasm target, making the codebase checking process more efficient and standard.

Signed-off-by: Benign X <[email protected]>
  • Loading branch information
W-Mai committed Nov 21, 2023
1 parent b232377 commit b523551
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions fmt_n_check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash

# This script formats and checks the codebase for errors.
# It is intended to be run before committing changes to the repository.

set -e

# Format the codebase.
echo "Formatting the codebase..."
cargo fmt --all -- --check

# Check the codebase for errors.
echo "Checking the codebase for errors..."
cargo check --all-features

# Check wasm target
echo "Checking wasm target..."
cargo check --all-features --lib --target wasm32-unknown-unknown

0 comments on commit b523551

Please sign in to comment.