File tree Expand file tree Collapse file tree 3 files changed +11
-6
lines changed
Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 11FROM java:8-jre
22
3- MAINTAINER Up2Go-DavidRenz
3+ MAINTAINER Sivakumar Kailasam
44
55RUN cd /tmp && \
6- wget http://dl.bintray.com/groovy/maven/apache-groovy-binary-2.4.6.zip && \
7- unzip apache-groovy-binary-2.4.6.zip && \
8- mv groovy-2.4.6 /groovy && \
6+ wget http://dl.bintray.com/groovy/maven/apache-groovy-binary-2.4.6.zip && \
7+ unzip apache-groovy-binary-2.4.6.zip && \
8+ mv groovy-2.4.6 /groovy && \
99 rm apache-groovy-binary-2.4.6.zip
1010
1111ENV GROOVY_HOME /groovy
Original file line number Diff line number Diff line change 22import groovy.json.JsonSlurper
33import groovy.util.FileNameFinder
44
5-
65def appContext = setupContext(args)
76def parsedConfig = new JsonSlurper (). parse(new File (appContext. configFile), " UTF-8" )
87
@@ -11,6 +10,10 @@ def codeFolder = new File(appContext.codeFolder)
1110
1211def filesToAnalyse = new FileNameFinder (). getFileNames(appContext. codeFolder, includePaths)
1312
13+ File analysisFilesTmp = new File (" /tmp/files" )
14+ analysisFilesTmp. createNewFile()
15+ analysisFilesTmp. deleteOnExit()
16+
1417def i = filesToAnalyse. iterator()
1518while (i. hasNext()) {
1619 string = i. next()
@@ -25,14 +28,16 @@ if (filesToAnalyse.isEmpty()) {
2528 System . exit(0 )
2629}
2730
31+ analysisFilesTmp << filesToAnalyse
32+
2833def ruleSetPath
2934if ( parsedConfig. config && (new File (parsedConfig. config). exists()) ) {
3035 ruleSetPath = parsedConfig. config
3136} else {
3237 ruleSetPath = " /usr/src/app/ruleset.xml"
3338}
3439
35- def pmdCommand = " /usr/src/app/lib/pmd/bin/run.sh pmd -d ${ filesToAnalyse } -f codeclimate -R ${ ruleSetPath} -v 35 -failOnViolation false"
40+ def pmdCommand = " /usr/src/app/lib/pmd/bin/run.sh pmd -filelist /tmp/files -f codeclimate -R ${ ruleSetPath} -l java -v 35 -failOnViolation false"
3641
3742ProcessBuilder builder = new ProcessBuilder ( pmdCommand. split(' ' ) )
3843
You can’t perform that action at this time.
0 commit comments