navi/scripts/fix

25 lines
556 B
Text
Raw Normal View History

2020-03-04 21:01:23 +00:00
#!/usr/bin/env bash
set -euo pipefail
export NAVI_HOME="$(cd "$(dirname "$0")/.." && pwd)"
2020-03-11 14:30:25 +00:00
source "${NAVI_HOME}/scripts/install"
2020-03-04 21:01:23 +00:00
cd "$NAVI_HOME"
2020-03-11 14:30:25 +00:00
header "Cargo nighly fix..."
cargo +nightly fix --clippy -Z unstable-options || true
2020-03-11 14:30:25 +00:00
header "Cargo fix..."
cargo fix || true
2020-03-11 14:30:25 +00:00
header "Cargo fmt..."
cargo fmt || true
2020-03-11 14:30:25 +00:00
header "dot code beautify..."
find scripts -type f | xargs -I% dot code beautify % || true
dot code beautify "${NAVI_HOME}/tests/core.bash" || true
dot code beautify "${NAVI_HOME}/tests/run" || true
header "clippy..."
cargo clippy || true