Skip to content

Commit

Permalink
fix spellcheck errors for format_exercises script
Browse files Browse the repository at this point in the history
  • Loading branch information
0xNeshi committed Dec 14, 2024
1 parent b14531d commit 2efb51e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bin/format_exercises.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ repo=$(git rev-parse --show-toplevel)
# directory and format Cairo files
exercises="$repo/exercises/*/*"

FMT_ARGS="$@"
# Capture all arguments passed to the script to pass them to scarb fmt
SCARB_FMT_ARGS=("$@")

for exercise_dir in $exercises; do
cd "$exercise_dir"
Expand All @@ -29,7 +30,7 @@ for exercise_dir in $exercises; do
fi

# check scaffold solution formatting
scarb fmt $FMT_ARGS
scarb fmt "${SCARB_FMT_ARGS[@]}"

# scarb fmt cannot currently format individual files, so we have to
# temporarily move the solution files into the Cairo package, where
Expand All @@ -53,7 +54,7 @@ for exercise_dir in $exercises; do
cp "$solution_file" "$scaffold_solution"

# check example solution formatting
scarb fmt $FMT_ARGS
scarb fmt "${SCARB_FMT_ARGS[@]}"

# copy the scaffold solution back
cp "$tmp_file" "$scaffold_solution"
Expand Down

0 comments on commit 2efb51e

Please sign in to comment.