Sha256: d846caa4580eeb2bae52f2878d1b2a190fb6d4f30df94e0c0d5ccc340f829a75
Contents?: true
Size: 679 Bytes
Versions: 8
Compression:
Stored size: 679 Bytes
Contents
#!/bin/bash # Format existing exercises using rustfmt RUST_TRACK_REPO_PATH=$(cd "$(dirname "$0")/.." && pwd) EXERCISES_PATH="${RUST_TRACK_REPO_PATH}/exercises/" # Some exercises use custom formatting for illustration purpose and should not be formatted. IGNORED_EXERCISES=( "diamond" "minesweeper" "rectangles" ) # Iterate over every exercise directory and if it is not ignored - format it for exercise_dir in ${EXERCISES_PATH}/*; do exercise_name=${exercise_dir##*/} if [[ " ${IGNORED_EXERCISES[*]} " == *"$exercise_name"* ]]; then echo "$exercise_name - Ignored" else ( echo "$exercise_name - Formatting" cd "$exercise_dir" cargo fmt ) fi done
Version data entries
8 entries across 8 versions & 1 rubygems