start a list of file patterns to ignore
This commit is contained in:
parent
247c260541
commit
1ea36658cc
|
@ -16,6 +16,8 @@ fi
|
|||
|
||||
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
|
||||
function_name="$(echo "$line" | awk '{print $1}')"
|
||||
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"
|
||||
continue
|
||||
fi
|
||||
if grep -E codemod <<< "$file_name" >/dev/null 2>&1; then
|
||||
echo "skipping ${file_name} because it's a codemod file"
|
||||
if grep -E "$filename_patterns_to_ignore" <<< "$file_name" >/dev/null 2>&1; then
|
||||
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
|
||||
fi
|
||||
echo "trying to remove $function_name from: ${file_name}"
|
||||
|
|
Loading…
Reference in New Issue