You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
402 B

#!/bin/bash
input=${1}
if [[ ${input} == "" ]]; then
input="-"
elif ! [[ -f ${input} ]]; then
echo "Usage: ${0} [puppet file]"
exit 1
fi
tempfile=$(mktemp)
cat "${input}" > "${tempfile}"
puppet-lint --fix "${tempfile}" > /dev/null 2>&1
#puppet-lint --log-format "%{filename}:%{line}:%{column}: %{kind}: %{message}. [%{check}]" ${tempfile} | grep -v warning:
cat "${tempfile}"
rm "${tempfile}"