start a list of file patterns to ignore
This commit is contained in:
parent
66ca74e18c
commit
337e497d1d
|
@ -16,6 +16,8 @@ fi
|
||||||
|
|
||||||
list_of_unused_things="$(dead | grep -E '^[a-z].*is never read')"
|
list_of_unused_things="$(dead | grep -E '^[a-z].*is never read')"
|
||||||
|
|
||||||
|
filename_patterns_to_ignore="(codemod|migrations/versions|conftest.py|noxfile.py)"
|
||||||
|
|
||||||
while read -r line; do
|
while read -r line; do
|
||||||
function_name="$(echo "$line" | awk '{print $1}')"
|
function_name="$(echo "$line" | awk '{print $1}')"
|
||||||
echo "possible function_name: ${function_name}"
|
echo "possible function_name: ${function_name}"
|
||||||
|
@ -25,8 +27,8 @@ while read -r line; do
|
||||||
echo "skipping $function_name in ${file_name} because it's not a function"
|
echo "skipping $function_name in ${file_name} because it's not a function"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
if grep -E codemod <<< "$file_name" >/dev/null 2>&1; then
|
if grep -E "$filename_patterns_to_ignore" <<< "$file_name" >/dev/null 2>&1; then
|
||||||
echo "skipping ${file_name} because it's a codemod file"
|
echo "skipping ${file_name} because it's in the list of files to ignore (probably because it is a false positive and actually used)"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
echo "trying to remove $function_name from: ${file_name}"
|
echo "trying to remove $function_name from: ${file_name}"
|
||||||
|
|
Loading…
Reference in New Issue