Handle path exclusions
This commit is contained in:
parent
1d18f769e5
commit
7aa4e9299e
1 changed files with 4 additions and 5 deletions
|
|
@ -85,22 +85,21 @@ pipeline {
|
|||
script {
|
||||
def PPDFOLDER = "${STATICANALYSIS}/ppd"
|
||||
dir(PPDFOLDER) {
|
||||
EXCLUDE_PARAM = ''
|
||||
def EXCLUDE_PARAM = ''
|
||||
if (EXCLUDE_PATHS) {
|
||||
EXCLUDE_PARAM = """--exclude "%EXCLUDE_PATHS%" """
|
||||
EXCLUDE_PARAM = """--exclude "${EXCLUDE_PATHS}" """
|
||||
}
|
||||
echo "EXCLUDE_PARAM=%EXCLUDE_PARAM%"
|
||||
if (isUnix()) {
|
||||
sh """#!/bin/bash
|
||||
set -e
|
||||
|
||||
export PMD_JAVA_OPTS=-Xmx65536m
|
||||
"${PPD}/run.sh" cpd --minimum-tokens 100 --files "${SRC}" --language cpp --format xml %EXCLUDE_PARAM% --failOnViolation false > cpd.xml
|
||||
"${PPD}/run.sh" cpd --minimum-tokens 100 --files "${SRC}" --language cpp --format xml ${EXCLUDE_PARAM} --failOnViolation false > cpd.xml
|
||||
"""
|
||||
} else {
|
||||
bat """
|
||||
set PMD_JAVA_OPTS=-Xmx2048m
|
||||
"${PPD}/cpd.bat" --minimum-tokens 100 --files "${SRC}" --language cpp --format xml %EXCLUDE_PARAM% --failOnViolation false > cpd.xml
|
||||
"${PPD}/cpd.bat" --minimum-tokens 100 --files "${SRC}" --language cpp --format xml ${EXCLUDE_PARAM} --failOnViolation false > cpd.xml
|
||||
"""
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue