sea-orm/build-tools/rustclippy.sh
Billy Chan 43495de0aa
Fix clippy warnings - 1 (#967)
* Fix clippy warnings

* cargo fmt

* Fix clippy warnings

* cargo fmt
2022-08-12 20:02:53 +08:00

26 lines
847 B
Bash

#!/bin/bash
set -e
if [ -d ./build-tools ]; then
targets=(
"Cargo.toml"
"sea-orm-cli/Cargo.toml"
"sea-orm-codegen/Cargo.toml"
"sea-orm-macros/Cargo.toml"
"sea-orm-migration/Cargo.toml"
"sea-orm-rocket/Cargo.toml"
)
for target in "${targets[@]}"; do
echo "cargo clippy --manifest-path ${target} --fix --allow-dirty --allow-staged"
cargo clippy --manifest-path "${target}" --fix --allow-dirty --allow-staged
done
examples=(`find examples -type f -name 'Cargo.toml'`)
for example in "${examples[@]}"; do
echo "cargo clippy --manifest-path ${example} --fix --allow-dirty --allow-staged"
cargo clippy --manifest-path "${example}" --fix --allow-dirty --allow-staged
done
else
echo "Please execute this script from the repository root."
fi