oclint:错误:违规超过了Jenkins的门槛

时间:2014-06-06 08:36:20

标签: json jenkins oclint

不能赢得oclint。我真的不知道该怎么做,我尝试在构建脚本中进行一些更改,但没有任何帮助。

脚本:

$XCODE_COMMAND -reporter json-compilation-database:${WORKSPACE}/compile_commands.json clean build
#${oclint.path}/bin/oclint-xcodebuild
${oclint_path}/bin/oclint-json-compilation-database \
${oclint_in} ${oclint_ex} -- -o=$BUILD_WORK_DIR/oclint/lint.xml \
-report-type=pmd -stats -max-priority-1=9999 -max-priority-2=9999 -max-priority-3=9999 -rc LONG_LINE=500 -rc LONG_VARIABLE_NAME=100
sed -i .bak 's/\&\&/\&/g' "$BUILD_WORK_DIR"/oclint/lint.xml

错误:

18:22:18 + oclint/bin/oclint-json-compilation-database -- -o=/Users/ep/jenkins- slave/workspace/test_RGP-ODC_RacingPost_iPad_staging/./build/oclint/lint.xml -report-type=pmd -stats -max-priority-   1=9999 -max-priority-2=9999 -max-priority-3=9999 -rc LONG_LINE=500 -rc LONG_VARIABLE_NAME=100
18:27:22 
18:27:22 oclint: error: violations exceed threshold
18:27:22 P1=2[9999] P2=3662[9999] P3=11784[9999] 
18:27:23 Build step 'Execute shell' marked build as failure

1 个答案:

答案 0 :(得分:2)

为什么不将阈值提高到9999以上?

  

maxPriority = 15000

     

$ {oclint_in} $ {oclint_ex} - -o = $ BUILD_WORK_DIR / oclint / lint.xml   -report型= PMD -stats -max优先-1 = $ maxPriority -max优先-2 = $ maxPriority -max优先-3 = $ maxPriority -RC LONG_LINE = 500 -RC LONG_VARIABLE_NAME = 100