Skip to content

Instantly share code, notes, and snippets.

@MatthewVita
Last active February 25, 2017 17:32
Show Gist options
  • Save MatthewVita/ce841e6f05b35cc9c9861bd0439b0547 to your computer and use it in GitHub Desktop.
Save MatthewVita/ce841e6f05b35cc9c9861bd0439b0547 to your computer and use it in GitHub Desktop.
OpenEMR Parallel Linter
#!/bin/bash
if [ -z "$1" ] || [ "$1" == "-h" ] || [ "$1" == "--help" ] ; then
printf "OpenEMR Parallel Linter\n\n"
printf " Arguments\n"
printf " -h, --help | Information on using this script\n"
printf " -d, --dir | The codebase directory for OpenEMR\n"
exit 0
fi
if [ "$1" == "-d" ] || [ "$1" == "--dir" ] ; then
cd $2
find . -type d \( -path ./phpmyadmin \
-o -path ./vendor \
-o -path ./interface/main/calendar/modules \
-o -path ./interface/reports \
-o -path ./contrib/util \
-o -path ./library/openflashchart \
-o -path ./library/html2pdf/vendor/tecnickcom \
-o -path ./library/classes/fpdf \
-o -path ./library/html2pdf \
-o -path ./gacl \
-o -path ./library/edihistory \) -prune -o \
-name "*.php" -print0 | xargs -0 -n1 -P8 php -l
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment