2023-06-08 19:38:26 +00:00
|
|
|
#!/usr/bin/env bash
|
2022-11-19 04:33:54 +00:00
|
|
|
set -e
|
|
|
|
|
2023-02-18 14:36:12 +00:00
|
|
|
CWD="$(cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"
|
|
|
|
|
|
|
|
cd $CWD/../
|
|
|
|
|
2023-12-01 14:18:29 +00:00
|
|
|
cargo clippy --workspace --fix --allow-staged --allow-dirty --tests --all-targets -- -D warnings
|
2023-02-18 14:36:12 +00:00
|
|
|
|
2023-08-02 16:44:51 +00:00
|
|
|
# Format rust files
|
2023-02-18 14:36:12 +00:00
|
|
|
cargo +nightly fmt
|
2023-08-02 16:44:51 +00:00
|
|
|
|
|
|
|
# Format toml files
|
2023-07-14 08:45:18 +00:00
|
|
|
taplo format
|
2023-08-02 16:44:51 +00:00
|
|
|
|
|
|
|
# Format sql files
|
|
|
|
find migrations -type f -name '*.sql' -exec pg_format -i {} +
|