1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-04 14:31:46 +00:00

more syntax tests

This commit is contained in:
deadc0de6
2022-08-28 22:10:34 +02:00
parent df65f3a126
commit 09f9239f7f

17
tests.sh vendored
View File

@@ -48,9 +48,24 @@ pylint \
--disable=R0915 \
--disable=R0912 \
--disable=R0911 \
--disable=C0209 \
dotdrop/
set +e
exceptions="save_uservariables_name\|@@\|diff_cmd\|original,\|modified,"
# f-string errors and missing f literal
find dotdrop/ -iname '*.py' -exec grep --with-filename -n -v "f'" {} \; | grep -v "{'" | grep -v "${exceptions}" | grep "'.*}" \
&& echo "bad string format (1): ${errs}" && exit 1
find dotdrop/ -iname '*.py' -exec grep --with-filename -n -v 'f"' {} \; | grep -v "f'" | grep -v '{"' | grep -v "${exceptions}" | grep '".*}' \
&& echo "bad string format (2): ${errs}" && exit 1
# use of .format()
#grep -r -n --with-filename '\.format(' dotdrop/ \
# && echo "bad string format (3): ${errs}" && exit 1
set -e
# coverage file location
rl="readlink -f"
if ! ${rl} "${0}" >/dev/null 2>&1; then