-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
richelbilderbeek
committed
Oct 10, 2023
1 parent
56867b3
commit ee2ef82
Showing
3 changed files
with
77 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ day_3.html | |
day_3.ipynb | ||
day_3.tex | ||
day_3.pdf | ||
temp_ruff_results.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
# | ||
# | ||
|
||
# Ignore the first ruff error | ||
ruff day_3.qmd > temp_ruff_results.txt 2>&1 | ||
|
||
last_line=$(cat temp_ruff_results.txt | tail -n 1) | ||
# echo "last_line: ${last_line}" | ||
n_errors_plus_one=$(echo "${last_line}" | cut -d ' ' -f 2) | ||
# echo "Number of errors plus one: ${n_errors_plus_one}" | ||
n_errors=$((n_errors_plus_one-1)) | ||
echo "Number of errors: ${n_errors}" | ||
|
||
exit ${n_errors} | ||
|
||
# FAILS: will still always give an error | ||
# Remove the part between '---' | ||
#tail -n +11 day_3.qmd > temp_day_3.qmd | ||
#ruff temp_day_3.qmd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters