Skip to content

Instantly share code, notes, and snippets.

@ScriptAutomate
Last active August 27, 2021 21:49
Show Gist options
  • Save ScriptAutomate/8794d3b6d20e73f66afd548066e9c9bb to your computer and use it in GitHub Desktop.
Save ScriptAutomate/8794d3b6d20e73f66afd548066e9c9bb to your computer and use it in GitHub Desktop.
Search for automodule docs generations, in Python projects, that are referrencing non-existant files in Salt repo
AUTOMODULES=`grep -rn ".. automodule:: " doc/ | grep -v "_templates" | cut -d' ' -f3`
for MODULE in $AUTOMODULES; do
MODULE_FILE="$(echo $MODULE | sed 's:\.:\/:g').py"
if [[ ! -f "$MODULE_FILE" ]]; then
echo "$MODULE_FILE"
echo "--------"
echo "ERROR: Attempting to import $MODULE_FILE, which does not exist."
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment