Skip to content

Instantly share code, notes, and snippets.

Created June 18, 2013 22:04
Show Gist options
  • Save anonymous/5809866 to your computer and use it in GitHub Desktop.
Save anonymous/5809866 to your computer and use it in GitHub Desktop.
WIP automated code smell detection using puppet-lint, for better or for worse.
#!/bin/bash
find . -name "*.pp" -print0 | xargs -0 puppet-lint --no-80chars-check --no-2sp_soft_tabs-check --with-filename --no-trailing_whitespace-check --no-hard_tabs-check --no-arrow_alignment-check > puppet.lint
grep "WARNING" puppet.lint | cut -d ":" -f 1 | sort | uniq -c | sort -gb > puppet.lint.warnings
grep "ERROR" puppet.lint | cut -d ":" -f 1 | sort | uniq -c | sort -gb > puppet.lint.errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment