
Some checks failed
CI/CD Pipeline / Test Suite (push) Has been cancelled
CI/CD Pipeline / Security Audit (push) Has been cancelled
CI/CD Pipeline / Build Docker Image (push) Has been cancelled
CI/CD Pipeline / Deploy to Staging (push) Has been cancelled
CI/CD Pipeline / Deploy to Production (push) Has been cancelled
CI/CD Pipeline / Performance Benchmarks (push) Has been cancelled
CI/CD Pipeline / Cleanup (push) Has been cancelled
17 lines
427 B
Bash
Executable File
17 lines
427 B
Bash
Executable File
#!/bin/bash
|
|
# Pre-push hook to run cargo +nightly fmt
|
|
|
|
echo "Running cargo +nightly fmt before push..."
|
|
|
|
# Run cargo +nightly fmt
|
|
cargo +nightly fmt
|
|
|
|
# Check if there are any changes after formatting
|
|
if ! git diff --quiet; then
|
|
echo "Code has been formatted. Please commit the changes and push again."
|
|
echo "Run: git add . && git commit -m \"cargo fmt\" && git push"
|
|
exit 1
|
|
fi
|
|
|
|
echo "Code formatting check passed!"
|