Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SonarQube can't run without sonar.cppcheck.reportPath #4

Open
jtpereyda opened this issue Jun 10, 2016 · 4 comments
Open

SonarQube can't run without sonar.cppcheck.reportPath #4

jtpereyda opened this issue Jun 10, 2016 · 4 comments

Comments

@jtpereyda
Copy link

Running a project without a cppcheck file is impossible, as the plugin will throw an error.

It would be helpful if the plugin could fail silently and allow other checkers to run if there is no cppcheck.reportPath property.

This is especially helpful in a situation with one install and multiple projects.

@jtpereyda
Copy link
Author

It looks like the relevant methods are:

  • getCppcheckReportFile in sonar-cppcheck/src/test/java/org/sonarqube/cppcheck/CppcheckConfigurationTest.java and
  • analyse in sonar-cppcheck/src/main/java/org/sonarqube/cppcheck/CppcheckSensor.java

We could have getCppcheckReportFile throw a custom exception for this case, and have analyse catch it and fail quiet if no setting is defined.

@MattSom
Copy link

MattSom commented Jul 7, 2016

I am trying to solve a problem not the same as this, but similar. I was thinking about to write a script launcher, which triggers the necessary plugin runs (cppcheck for obvious reasons), which also writes cppcheck.reportPath property into the file, if it is missing.
This way I wouldn't have to run cppcheck and later other plugins manually for every project before scanning.

Of course, if you want an analysis without cppcheck this idea is not a solution, I know.

@jtpereyda
Copy link
Author

@MattSom Well that sounds great, I'd encourage you to go for it!

@CSV-Tom
Copy link

CSV-Tom commented Jul 12, 2017

It's possible to solve the problem next time? :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants