-
Notifications
You must be signed in to change notification settings - Fork 2
/
check.sh
executable file
·33 lines (30 loc) · 960 Bytes
/
check.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
set -e # Exit immediately if a command exits with a non-zero status.
if [ "$1" == "--no-fix" ]; then
poetry run ruff format --check
poetry run ruff format --line-length 80 --check examples
poetry run ruff check --select I
poetry run ruff check
else
poetry run ruff format
poetry run ruff format --line-length 80 examples
poetry run ruff check --fix --select I
poetry run ruff check --fix
fi
poetry run mypy django_typer
poetry run pyright
poetry check
poetry run pip check
cd ./doc
poetry run doc8 --ignore-path build --max-line-length 100 -q
# check for broken links in the docs ############
set +e
# do not run this in CI - too spurious
if [ "$1" != "--no-fix" ]; then
poetry run sphinx-build -b linkcheck -q -D linkcheck_timeout=5 ./source ./build > /dev/null 2>&1
if [ $? -ne 0 ]; then
cat ./build/output.txt | grep broken
exit 1
fi
fi
#################################################
cd ..