How to configure Hudson with sonar plugin for python so that the sonar report shows pyflakes-based analysis instead of pylint-based analysis?

StackOverflow https://stackoverflow.com/questions/17877139

Question

I am currently using Hudson for continuous integration with python and sonar plugin for code analysis. Since I prefer pyflakes to pylint, in the build option, I've written a pyflakes command to generate a txt file. In the report violations section, I've redirected the pylint option to this txt (in the XML filename pattern). So the Hudson status is successfully showing the correct number of pyflakes-based violations in its report. But sonar is conducting its own analysis through pylint and showing pylint-based analysis. How do I redirect the pyflakes txt file to Sonar so that it doesn't use pylint and instead just analyse whatever has been mentioned in the pyflakes txt file? Which configurations or files would I have to tweak to make it possible?

Was it helpful?

Solution

There is no "reuse report" feature on the SonarQube python plugin so for now you can't prevent SonarQube to start a new pylint analysis.

I suggest you ask for the creation of a JIRA feature request on SonarQube user mailing list.

In the meantime you can try to use sonar.python.pylint parameter to make SonarQube run pyflakes instead of pylint as it seems output report are compatible (at least for Hudson). But I can't assure it will work.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top