Version 2 — Juin 2023 — James
Voir bootstrap, framework, sdk
# Récupération de la liste des baselines
find plugins-dist/spip -name phpstan-baseline.neon | grep -v vendor > tmp/baselines.txt
# Récupération de la liste des fonctions non trouvées par phpstan
cat tmp/baselines.txt | xargs -I % grep Function % | grep 'not found' | sed -e 's/.*Function //' -e 's/ not found.*//' | sort | uniq > tmp/called.lst
wc -l tmp/called.txt
# 330 tmp/called.txt
rm tmp/baselines.txt
# Trouver les fichiers spip déclarant ces fonctions
cat tmp/called.lst | xargs -I % egrep -rn --exclude-dir tests '^function %\(' ecrire | cut -d: -f1 | sort | uniq > tmp/files.txt
wc -l tmp/files.lst
# 64 tmp/files.txt