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

Nothing reported, even though sonar-reports looks good #52

Open
drewcrawford opened this issue Jan 31, 2014 · 5 comments
Open

Nothing reported, even though sonar-reports looks good #52

drewcrawford opened this issue Jan 31, 2014 · 5 comments
Labels

Comments

@drewcrawford
Copy link

I've got an interesting issue, where sonar-runner doesn't report unit tests, test coverage, or OCLint issues even when sonar-reports contains reasonable-looking data for all 3 and sonar-runner reports it's looking at the right report files.

Here's a sonar-reports folder that contains reasonable-looking data for all 3.

Here's debug output for sonar-runner. In spite of correctly detecting the coverage report and OCLint file, it reports 0 violations, 0% coverage, and 0 unit tests.

What is going on here?

@cyrilpicat
Copy link
Contributor

thanks for the report. I hope to be able to work on the plugin next week, I'll let you know if I am missing anything.

@drewcrawford
Copy link
Author

Affected configuration:

  • Sonarqube 4.1.1
  • sonar-runner 2.3
  • Java plugin NOT installed
  • sonar-objective-c 0.3.1

There are three different underlying causes happening here.

  1. The unit test success/fail report happens via junit, which requires the Java plugin to be installed. If the Java plugin is not installed you don't get any unit test reporting. The dependency on the Java plugin should be documented, and you should get an error if the Java plugin isn't installed.
  1. The fileExists functions for both coverage and OCLint always returns false because the file in question hasn't been indexed yet by the SonarContext. I haven't traced the problem any further than that, but the referenced commits cause the files to be manually indexed. Note that there is some change in indexing I don't really understand coming down the pipe for SonarQube 4.2, so this may need to be revisited. See code comments.
  2. The fileExists() functions only seem to work correctly if given an absolute path, not a relative one. oclint.xml has absolute paths which works fine. The coverage XML requires some additional massaging to convert the relative paths into absolute ones.

Problems 2 and 3 are addressed in PR #53, Problem 1 probably needs @cyrilpicat to look at it.

@cyrilpicat
Copy link
Contributor

A side note, I think you are running into issues because you are using SonarQube 4.1. Myself I never tried it as my projects are still on Sonar 3.7.2.

I just did the case and the ObjC plugin is working fine with or without the Java plugin in Sonar 3.7.2. I will install the latest Sonar and investigate more this issue. The dependency on the Java plugin would be a bad thing I think, but of course the plugin should continue to work if it's present.

@minid33
Copy link

minid33 commented Jul 22, 2014

Using
sonar-objective-c 0.3.2-SNAPSHOT
SonarQube 4.3
SonarQube Runner 2.4
Java 1.6.0_65 Apple Inc. (64-bit)
Mac OS X 10.9.4 x86_64

Just to confirm that we too have this problem where the Sonar Analyser completes without raising an error and we pass in a TEST-Junit.xml cobertura.xml and oclint.xml which are all parsed by various jenkins plugins and show coverage, test dispostion and violations over time in jenkins but when they are consumed by the Sonar Runner there is no data other than LoC, files, duplication and comments as statistics inside our instance of SonarQube.

I see a lot of debug lines containing this:
16:34:24.074 DEBUG - None of the channel has been able to handle character '/' (decimal value 47) at line 31, column 64
and also something else that stands out is:
16:34:26.286 DEBUG - To prevent a memory leak, the JDBC Driver [org.postgresql.Driver] has been forcibly deregistered

@runv
Copy link

runv commented Aug 28, 2014

I have the same issue with the same lines in debug as minid33.

sonar-objective-c 0.3.2-SNAPSHOT
SonarQube 4.3
SonarQube Runner 2.4
Java 1.7.0_60-b19 (64-bit)
Mac OS X 10.9.4 x86_64

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

No branches or pull requests

4 participants