File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -17,12 +17,16 @@ while(i.hasNext()) {
17
17
}
18
18
}
19
19
20
- filesToAnalyse = filesToAnalyse. toString()
21
- filesToAnalyse = filesToAnalyse. substring(1 , filesToAnalyse. length()-1 ). replaceAll(" \\ s+" ," " )
22
20
if (filesToAnalyse. isEmpty()) {
23
21
System . exit(0 )
24
22
}
25
23
24
+
25
+ def fileList = File . createTempFile(" apexmetrics-filelist-" , null , null )
26
+ fileList. deleteOnExit()
27
+ fileList. write filesToAnalyse. join(" ,\n " )
28
+ fileList << " \n "
29
+
26
30
def ruleset
27
31
def defaultRulesetLocation = " /usr/src/app/apex-ruleset.xml"
28
32
def customRulesetLocation = " /code/apex-ruleset.xml"
33
37
ruleset = defaultRulesetLocation
34
38
}
35
39
36
- def pmdCommand = " /usr/src/app/lib/pmd/bin/run.sh pmd -d ${ filesToAnalyse } -f codeclimate -R ${ ruleset} -l apex -v 35 -failOnViolation false"
40
+ def pmdCommand = " /usr/src/app/lib/pmd/bin/run.sh pmd -filelist ${ fileList } -f codeclimate -R ${ ruleset} -l apex -v 35 -failOnViolation false"
37
41
38
42
ProcessBuilder builder = new ProcessBuilder ( pmdCommand. split(' ' ) )
39
43
You can’t perform that action at this time.
0 commit comments