Idean / sonar-swift

Open source Swift plugin for SonarQube (also supports Objective-C)
Other
896 stars 276 forks source link

Lizard issue, won't generate #39

Closed ppeelen closed 7 years ago

ppeelen commented 8 years ago

Hi!

I have an issue with lizard. It generates the reports perfectly if I run it myself, but running it with run-sonar-swift.sh just won't work. My project has embedded frameworks which I would like to run as well. I found out that when using Lizard you must space separate the different folders, however the properties file requires comma separated. So I added the line srcDirsSpaced="${srcDirs//,/ }" to the # Lizard Complexity block in run-sonar-swift.sh, however it still won't work. When I run lizard --xml MyApp Shared API > sonar-reports/lizard-report.xml manually, I get the correct report. When running run-sonar-swift.sh I get 0 files analysed. I can't seem to understand why.

If I run without using $srcDir, so basicly with the command lizard --xml > sonar-reports/lizard-report.xml it will generate a correct report.

Yours, Paul

gounthar commented 8 years ago

Same for me.

pbernery commented 8 years ago

Hi,

@ppeelen, or @gounthar, could you try removing the quotes around your version of $srcDirs ($srcDirsSpaced) if you kept them. I suspect it should incorrectly build the folder parameters for lizard.

ghost commented 7 years ago

I have same issue

sidd9433 commented 7 years ago

Removing the double quote worked, also need to remove ',' in case of multiple sources separated by comma. $LIZARD_CMD --xml ${srcDirs//,/ } > sonar-reports/lizard-report.xml