mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-11 11:24:16 +00:00
more syntax tests
This commit is contained in:
17
tests.sh
vendored
17
tests.sh
vendored
@@ -48,9 +48,24 @@ pylint \
|
|||||||
--disable=R0915 \
|
--disable=R0915 \
|
||||||
--disable=R0912 \
|
--disable=R0912 \
|
||||||
--disable=R0911 \
|
--disable=R0911 \
|
||||||
--disable=C0209 \
|
|
||||||
dotdrop/
|
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
|
# coverage file location
|
||||||
rl="readlink -f"
|
rl="readlink -f"
|
||||||
if ! ${rl} "${0}" >/dev/null 2>&1; then
|
if ! ${rl} "${0}" >/dev/null 2>&1; then
|
||||||
|
|||||||
Reference in New Issue
Block a user