Lint
This commit is contained in:
parent
fc40d3eccf
commit
491a601ad2
9 changed files with 101 additions and 77 deletions
27
scripts/check.sh
Executable file
27
scripts/check.sh
Executable file
|
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
echo "Running checks in sync-server"
|
||||
cd sync-server
|
||||
cargo clippy --all-targets --all-features
|
||||
cargo fmt --all -- --check
|
||||
cargo machete
|
||||
cargo test --verbose
|
||||
|
||||
|
||||
echo "Running checks in frontend"
|
||||
cd ../frontend
|
||||
npm ci
|
||||
npm run build
|
||||
npm run lint
|
||||
if [[ $(git status --porcelain) ]]; then
|
||||
git status --porcelain
|
||||
echo "Failing CI because the working directory is not clean after linting"
|
||||
exit 1
|
||||
fi
|
||||
npm run test
|
||||
|
||||
echo "Finished"
|
||||
|
||||
cd ..
|
||||
Loading…
Add table
Add a link
Reference in a new issue