Jenkins iOS SLOCCount 代码行数检测实践

Jenkins iOS SLOCCount 代码行数检测实践_第1张图片
image.png


export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"
cd ${WORKSPACE}

jenkinsDownloadedPath=${JENKINS_HOME}/workspace/${JOB_NAME}/
workspacePath=$jenkinsDownloadedPath"你的项目名称"

sloccount --duplicates --wide --details $workspacePath $workspacePath $workspacePath web > sloccount.sc

可以看到我们可以针对每个文件,每个文件夹进行代码排行,方便检测代码过多的文件,进行相关的优化

Jenkins iOS SLOCCount 代码行数检测实践_第2张图片
image.png

你可能感兴趣的:(Jenkins iOS SLOCCount 代码行数检测实践)