kiwi-el8/helper/attributes_not_used
Marcus Schäfer 43114aa9ea Fix attributes_not_used helper script
The script is used to check which parts of the XML schema
are not used by the new (kiwi v8) version. The information
is helpful to find missing or obsolete attribute handling
in v8 vs. v7
2016-10-07 11:46:46 +02:00

20 lines
476 B
Bash
Executable File

#!/bin/bash
function all_attribute_getter {
for match in $(grep -E '^ def get_' ../kiwi/xml_parse.py); do
if [[ $match =~ ^get_ ]];then
name=$(echo $match | cut -f1 -d'(')
if [[ ! $name =~ _$ ]];then
echo $name
fi
fi
done | sort | uniq
}
for f in $(all_attribute_getter); do
if ! find ../kiwi -name "*.py" | grep -v xml_parse.py | xargs grep -q $f
then
echo "--- $f"
fi
done