Last active
December 17, 2015 05:18
-
-
Save camilonova/5556741 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script create a report for jenkins violations plugin | |
# Author: AxiaCore S.A.S. http://axiacore.com | |
echo "Generating cloc report..." | |
mkdir -p reports | |
cloc --by-file --exclude-dir=static,migrations,libs,vendor,reports --exclude-ext=min.js,min.css --exclude-lang=make --quiet --csv "`pwd`/" | egrep -v 'Counting|language' | awk -F, '{ if ($1 == "Bourne Again Shell") {language="shell"} else if ($1 == "Bourne Shell") {language="shell"} else { language=tolower($1) } n=split($2, basedir, "/"); folder=basedir[n-1]; print $5"\t"language"\t"folder"\t"$2 }' > reports/cloc.report | |
echo "Done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment