Created
November 21, 2013 22:44
-
-
Save SergioEstevao/7591170 to your computer and use it in GitHub Desktop.
A script for running OCLint in Jenkins and create PMD reports
This file contains hidden or 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
#import path | |
export PATH=${PATH}:/usr/local/bin | |
#import what we have in bash_profile | |
source ~/.bash_profile | |
#check for oclint | |
hash oclint &> /dev/null | |
if [ $? -eq 1 ]; then | |
echo >&2 "oclint not found, analyzing stopped" | |
exit 1 | |
fi | |
hash xctool &> /dev/null | |
if [ $? -eq 1 ]; then | |
echo >&2 "xctool not found, analyzing stopped" | |
exit 1 | |
fi | |
xctool -workspace MyProject.xcworkspace -scheme MyProject clean | |
xctool -workspace MyProject.xcworkspace -scheme MyProject -reporter json-compilation-database:compile_commands.json build | |
oclint-json-compilation-database \ | |
-e Pods \ | |
-- -rc=LONG_LINE=200 \ | |
-rc=NCSS_METHOD=60 \ | |
-rc=LONG_METHOD=100 \ | |
-rc=MINIMUM_CASES_IN_SWITCH=1 \ | |
-report-type pmd \ | |
-o oclint.xml \ | |
-max-priority-1 1000 \ | |
-max-priority-2 1000 \ | |
-max-priority-3 1000 \ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment