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

Compatibility with 4.2 sonar version #160

Closed
Lorena1985 opened this issue Apr 10, 2014 · 16 comments
Closed

Compatibility with 4.2 sonar version #160

Lorena1985 opened this issue Apr 10, 2014 · 16 comments
Milestone

Comments

@Lorena1985
Copy link

I have just instaled the new version of Sonar (4.2) and it seems to have any kind of incompatibility with this plugin because the check of unit tests does not work now.
Any ideas of what could be the matter? Is there any release planned, and if so, could you please tell me the aproximated date? Thanks.

@jmecosta
Copy link
Member

Do you mean the unit test disable checks? I would not be surprised the drop
in 4.2, as they have been keen to remove unit test support from core. I
think I've heard about this in some JIRA ticket, so this may mean that
those checks will not be there any more. Can you check in the server log if
you find any info about this.

For the new release, check the roadmap page in the wiki
On Apr 10, 2014 2:00 PM, "Lorena Gustavsson" notifications@github.com
wrote:

I have just instaled the new version of Sonar (4.2) and it seems to have
any kind of incompatibility with this plugin because the check of unit
tests does not work now.
Any ideas of what could be the matter? Is there any release planned, and
if so, could you please tell me the aproximated date? Thanks.

Reply to this email directly or view it on GitHubhttps://github.com//issues/160
.

@s7726
Copy link

s7726 commented Apr 15, 2014

Probably my bad for upgrading sonar before checking the compatibility, but is there anyway to get a 'pre-release' (before may) that gets this working with sonar 4.2? I've lost all but the most basic of metrics provided by the sonar core.

@jmecosta
Copy link
Member

You can compile the plugin from sources?
On Apr 16, 2014 2:54 AM, "s7726" notifications@github.com wrote:

Probably my bad for upgrading sonar before checking the compatibility, but
is there anyway to get a 'pre-release' (before may) that gets this working
with sonar 4.2? I've lost all but the most basic of metrics provided by the
sonar core.


Reply to this email directly or view it on GitHubhttps://github.com//issues/160#issuecomment-40548648
.

@jmecosta
Copy link
Member

By the way what metrics are missing?
On Apr 16, 2014 2:54 AM, "s7726" notifications@github.com wrote:

Probably my bad for upgrading sonar before checking the compatibility, but
is there anyway to get a 'pre-release' (before may) that gets this working
with sonar 4.2? I've lost all but the most basic of metrics provided by the
sonar core.


Reply to this email directly or view it on GitHubhttps://github.com//issues/160#issuecomment-40548648
.

@s7726
Copy link

s7726 commented Apr 16, 2014

Using the time change view in the dashboard I'm missing ~200 issues. None
of the following seem to be getting processed:

sonar.cxx.valgrind.reportPath=valgrind-reports/valgrind-result*.xml
sonar.cxx.vera.reportPath=vera-reports/vera-result.xml
sonar.cxx.rats.reportPath=rats-reports/rats-result.xml
sonar.cxx.cppcheck.reportPath=cppcheck-reports/cppcheck-result.xml
sonar.cxx.coverage.reportPath=coverage-reports/coverage-result.xml
sonar.cxx.xunit.reportPath=Tests/cppunit-result.xml
sonar.cxx.xunit.xsltURL=cppunit-1.x-to-junit-1.0.xsl

I have verified that those files do still contain issues which were
previously reported.

Is compiling this from source a simple mvn build package command?

Gavin S

On Tue, Apr 15, 2014 at 10:18 PM, Jorge Costa notifications@github.comwrote:

By the way what metrics are missing?
On Apr 16, 2014 2:54 AM, "s7726" notifications@github.com wrote:

Probably my bad for upgrading sonar before checking the compatibility,
but
is there anyway to get a 'pre-release' (before may) that gets this
working
with sonar 4.2? I've lost all but the most basic of metrics provided by
the
sonar core.


Reply to this email directly or view it on GitHub<
https://github.com/wenns/sonar-cxx/issues/160#issuecomment-40548648>
.


Reply to this email directly or view it on GitHubhttps://github.com//issues/160#issuecomment-40563916
.

@jmecosta
Copy link
Member

mvn clean install

On Wed, Apr 16, 2014 at 7:06 PM, s7726 notifications@github.com wrote:

Using the time change view in the dashboard I'm missing ~200 issues. None
of the following seem to be getting processed:

sonar.cxx.valgrind.reportPath=valgrind-reports/valgrind-result*.xml
sonar.cxx.vera.reportPath=vera-reports/vera-result.xml
sonar.cxx.rats.reportPath=rats-reports/rats-result.xml
sonar.cxx.cppcheck.reportPath=cppcheck-reports/cppcheck-result.xml
sonar.cxx.coverage.reportPath=coverage-reports/coverage-result.xml
sonar.cxx.xunit.reportPath=Tests/cppunit-result.xml
sonar.cxx.xunit.xsltURL=cppunit-1.x-to-junit-1.0.xsl

I have verified that those files do still contain issues which were
previously reported.

Is compiling this from source a simple mvn build package command?

Gavin S

On Tue, Apr 15, 2014 at 10:18 PM, Jorge Costa notifications@github.comwrote:

By the way what metrics are missing?
On Apr 16, 2014 2:54 AM, "s7726" notifications@github.com wrote:

Probably my bad for upgrading sonar before checking the compatibility,
but
is there anyway to get a 'pre-release' (before may) that gets this
working
with sonar 4.2? I've lost all but the most basic of metrics provided
by
the
sonar core.


Reply to this email directly or view it on GitHub<
https://github.com/wenns/sonar-cxx/issues/160#issuecomment-40548648>
.


Reply to this email directly or view it on GitHub<
https://github.com/wenns/sonar-cxx/issues/160#issuecomment-40563916>
.


Reply to this email directly or view it on GitHubhttps://github.com//issues/160#issuecomment-40618040
.

@s7726
Copy link

s7726 commented Apr 16, 2014

I built and installed the latest git and I'm still having the same issues.
I had been putting all my results files into subdirectories (that had been
working). The errors coming out of the cxx plugin say that the various
components can't find their files, so I moved the results to the top level
project directory. Still getting the same sort of errors.

10:46:43.543 INFO - Vera++ processes file = Project/includeMemory.h
10:46:43.544 WARN - Cannot find the file 'Project/includeMemory.h',
skipping violations

running sonar-runner -X doesn't seem to gain me much for debug info out of
the cxx plugin, should I use another option?

Gavin S

On Wed, Apr 16, 2014 at 10:07 AM, Jorge Costa notifications@github.comwrote:

mvn clean install

On Wed, Apr 16, 2014 at 7:06 PM, s7726 notifications@github.com wrote:

Using the time change view in the dashboard I'm missing ~200 issues.
None
of the following seem to be getting processed:

sonar.cxx.valgrind.reportPath=valgrind-reports/valgrind-result*.xml
sonar.cxx.vera.reportPath=vera-reports/vera-result.xml
sonar.cxx.rats.reportPath=rats-reports/rats-result.xml
sonar.cxx.cppcheck.reportPath=cppcheck-reports/cppcheck-result.xml
sonar.cxx.coverage.reportPath=coverage-reports/coverage-result.xml
sonar.cxx.xunit.reportPath=Tests/cppunit-result.xml
sonar.cxx.xunit.xsltURL=cppunit-1.x-to-junit-1.0.xsl

I have verified that those files do still contain issues which were
previously reported.

Is compiling this from source a simple mvn build package command?

Gavin S

On Tue, Apr 15, 2014 at 10:18 PM, Jorge Costa notifications@github.comwrote:

By the way what metrics are missing?
On Apr 16, 2014 2:54 AM, "s7726" notifications@github.com wrote:

Probably my bad for upgrading sonar before checking the
compatibility,
but
is there anyway to get a 'pre-release' (before may) that gets this
working
with sonar 4.2? I've lost all but the most basic of metrics provided
by
the
sonar core.


Reply to this email directly or view it on GitHub<
https://github.com/wenns/sonar-cxx/issues/160#issuecomment-40548648>
.


Reply to this email directly or view it on GitHub<
https://github.com/wenns/sonar-cxx/issues/160#issuecomment-40563916>
.


Reply to this email directly or view it on GitHub<
https://github.com/wenns/sonar-cxx/issues/160#issuecomment-40618040>
.


Reply to this email directly or view it on GitHubhttps://github.com//issues/160#issuecomment-40625119
.

@s7726
Copy link

s7726 commented Apr 16, 2014

So I've been messing with things trying to get it working, or at least
track down why it's not.

Now I have nothing. I now have no issues for my project, I'm showing some
scm stats, the number of files in the project and some of the info about
duplication.

Gavin S

On Wed, Apr 16, 2014 at 10:56 AM, Gavin Swanson gavinswanson@gmail.comwrote:

I built and installed the latest git and I'm still having the same issues.
I had been putting all my results files into subdirectories (that had been
working). The errors coming out of the cxx plugin say that the various
components can't find their files, so I moved the results to the top level
project directory. Still getting the same sort of errors.

10:46:43.543 INFO - Vera++ processes file = Project/includeMemory.h
10:46:43.544 WARN - Cannot find the file 'Project/includeMemory.h',
skipping violations

running sonar-runner -X doesn't seem to gain me much for debug info out of
the cxx plugin, should I use another option?

Gavin S

On Wed, Apr 16, 2014 at 10:07 AM, Jorge Costa notifications@github.comwrote:

mvn clean install

On Wed, Apr 16, 2014 at 7:06 PM, s7726 notifications@github.com wrote:

Using the time change view in the dashboard I'm missing ~200 issues.
None
of the following seem to be getting processed:

sonar.cxx.valgrind.reportPath=valgrind-reports/valgrind-result*.xml
sonar.cxx.vera.reportPath=vera-reports/vera-result.xml
sonar.cxx.rats.reportPath=rats-reports/rats-result.xml
sonar.cxx.cppcheck.reportPath=cppcheck-reports/cppcheck-result.xml
sonar.cxx.coverage.reportPath=coverage-reports/coverage-result.xml
sonar.cxx.xunit.reportPath=Tests/cppunit-result.xml
sonar.cxx.xunit.xsltURL=cppunit-1.x-to-junit-1.0.xsl

I have verified that those files do still contain issues which were
previously reported.

Is compiling this from source a simple mvn build package command?

Gavin S

On Tue, Apr 15, 2014 at 10:18 PM, Jorge Costa notifications@github.comwrote:

By the way what metrics are missing?
On Apr 16, 2014 2:54 AM, "s7726" notifications@github.com wrote:

Probably my bad for upgrading sonar before checking the
compatibility,
but
is there anyway to get a 'pre-release' (before may) that gets this
working
with sonar 4.2? I've lost all but the most basic of metrics
provided
by
the
sonar core.


Reply to this email directly or view it on GitHub<
https://github.com/wenns/sonar-cxx/issues/160#issuecomment-40548648>
.


Reply to this email directly or view it on GitHub<
https://github.com/wenns/sonar-cxx/issues/160#issuecomment-40563916>
.


Reply to this email directly or view it on GitHub<
https://github.com/wenns/sonar-cxx/issues/160#issuecomment-40618040>
.


Reply to this email directly or view it on GitHubhttps://github.com//issues/160#issuecomment-40625119
.

@s7726
Copy link

s7726 commented Apr 16, 2014

So moving back to the old (0.9) version of the plugin dropped almost all
the metrics. Going back to the git version has brought back the complexity
metrics. Still missing everything else.

Gavin S

On Wed, Apr 16, 2014 at 2:45 PM, Gavin Swanson gavinswanson@gmail.comwrote:

So I've been messing with things trying to get it working, or at least
track down why it's not.

Now I have nothing. I now have no issues for my project, I'm showing some
scm stats, the number of files in the project and some of the info about
duplication.

Gavin S

On Wed, Apr 16, 2014 at 10:56 AM, Gavin Swanson gavinswanson@gmail.comwrote:

I built and installed the latest git and I'm still having the same
issues. I had been putting all my results files into subdirectories (that
had been working). The errors coming out of the cxx plugin say that the
various components can't find their files, so I moved the results to the
top level project directory. Still getting the same sort of errors.

10:46:43.543 INFO - Vera++ processes file = Project/includeMemory.h
10:46:43.544 WARN - Cannot find the file 'Project/includeMemory.h',
skipping violations

running sonar-runner -X doesn't seem to gain me much for debug info out
of the cxx plugin, should I use another option?

Gavin S

On Wed, Apr 16, 2014 at 10:07 AM, Jorge Costa notifications@github.comwrote:

mvn clean install

On Wed, Apr 16, 2014 at 7:06 PM, s7726 notifications@github.com
wrote:

Using the time change view in the dashboard I'm missing ~200 issues.
None
of the following seem to be getting processed:

sonar.cxx.valgrind.reportPath=valgrind-reports/valgrind-result*.xml
sonar.cxx.vera.reportPath=vera-reports/vera-result.xml
sonar.cxx.rats.reportPath=rats-reports/rats-result.xml
sonar.cxx.cppcheck.reportPath=cppcheck-reports/cppcheck-result.xml
sonar.cxx.coverage.reportPath=coverage-reports/coverage-result.xml
sonar.cxx.xunit.reportPath=Tests/cppunit-result.xml
sonar.cxx.xunit.xsltURL=cppunit-1.x-to-junit-1.0.xsl

I have verified that those files do still contain issues which were
previously reported.

Is compiling this from source a simple mvn build package command?

Gavin S

On Tue, Apr 15, 2014 at 10:18 PM, Jorge Costa <
notifications@github.com>wrote:

By the way what metrics are missing?
On Apr 16, 2014 2:54 AM, "s7726" notifications@github.com wrote:

Probably my bad for upgrading sonar before checking the
compatibility,
but
is there anyway to get a 'pre-release' (before may) that gets this
working
with sonar 4.2? I've lost all but the most basic of metrics
provided
by
the
sonar core.


Reply to this email directly or view it on GitHub<
https://github.com/wenns/sonar-cxx/issues/160#issuecomment-40548648>

.


Reply to this email directly or view it on GitHub<
https://github.com/wenns/sonar-cxx/issues/160#issuecomment-40563916>
.


Reply to this email directly or view it on GitHub<
https://github.com/wenns/sonar-cxx/issues/160#issuecomment-40618040>
.


Reply to this email directly or view it on GitHubhttps://github.com//issues/160#issuecomment-40625119
.

@wenns
Copy link
Contributor

wenns commented Apr 17, 2014

Maybe you hit this #102 bug?

@s7726
Copy link

s7726 commented Apr 17, 2014

Yep, looks like that's the issue. After hand modifying the files to include
the './' at the beginning of the paths everything seems to be back to
normal. I'll add a comment/ star the bug for tracking purposes. Is there a
solution in the works?

Gavin S

On Wed, Apr 16, 2014 at 10:44 PM, Waleri Enns notifications@github.comwrote:

Maybe you hit this #102 https://github.com/wenns/sonar-cxx/issues/102bug?


Reply to this email directly or view it on GitHubhttps://github.com//issues/160#issuecomment-40683047
.

@s7726
Copy link

s7726 commented Apr 17, 2014

Brought the issue up on the sonar-user list. It looks like it was a change
in the way the sonar API handles relative pathing. Trying to get them to
put in a ticket to fix the regression.

Gavin S

On Thu, Apr 17, 2014 at 7:57 AM, Gavin Swanson gavinswanson@gmail.comwrote:

Yep, looks like that's the issue. After hand modifying the files to
include the './' at the beginning of the paths everything seems to be back
to normal. I'll add a comment/ star the bug for tracking purposes. Is there
a solution in the works?

Gavin S

On Wed, Apr 16, 2014 at 10:44 PM, Waleri Enns notifications@github.comwrote:

Maybe you hit this #102 https://github.com/wenns/sonar-cxx/issues/102bug?


Reply to this email directly or view it on GitHubhttps://github.com//issues/160#issuecomment-40683047
.

@s7726
Copy link

s7726 commented Apr 17, 2014

Looks like the sonar guys have no intention of fixing what they broke. So
lets try something else...

Easy solution would be to just take any file name and append './' to the
front of it. That of course could cause issues for anything that uses fully
qualified paths. We could do our own check to see if the path is valid as
is, or if appending './' makes it valid. Before sending it off to sonar.

I still feel like this should be handled by the API, the way it was before.

Gavin S

On Thu, Apr 17, 2014 at 11:49 AM, Gavin Swanson gavinswanson@gmail.comwrote:

Brought the issue up on the sonar-user list. It looks like it was a change
in the way the sonar API handles relative pathing. Trying to get them to
put in a ticket to fix the regression.

Gavin S

On Thu, Apr 17, 2014 at 7:57 AM, Gavin Swanson gavinswanson@gmail.comwrote:

Yep, looks like that's the issue. After hand modifying the files to
include the './' at the beginning of the paths everything seems to be back
to normal. I'll add a comment/ star the bug for tracking purposes. Is there
a solution in the works?

Gavin S

On Wed, Apr 16, 2014 at 10:44 PM, Waleri Enns notifications@github.comwrote:

Maybe you hit this #102 https://github.com/wenns/sonar-cxx/issues/102bug?


Reply to this email directly or view it on GitHubhttps://github.com//issues/160#issuecomment-40683047
.

@jmecosta
Copy link
Member

before anything, we need to make sure all the implementation is in accordance with the guidelines here http://docs.codehaus.org/display/SONAR/API+Changes.

@s7726
Copy link

s7726 commented Apr 18, 2014

So for the time being I'm back up and running with the following python

script running against all my result files prior to sonar analysis

fix_result_paths.py

#! /usr/bin/python -tt3

Turn on all warnings.

import warnings
warnings.simplefilter("always")

import sys
import re

for inFile in sys.argv[1:]:
inputFile = open(inFile, "r")
inputText = inputFile.read()
inputFile.close()

outputFile = open(inFile, "w")
outputText = re.sub("Module1\/", "./Module1/", inputText)
outputText = re.sub("Module2\/", "./Module2/", outputText)
outputText = re.sub("Tests\/", "./Tests/", outputText)
outputFile.write(outputText)
outputFile.close()

Not the best, most flexible, or cleanest looking thing I've ever written,
but it gets the job done for me. Change the Module# and Test directories to
whatever you need, add more, subtract a few.

Then call it like this:

./fix_result_paths.py coverage-result.xml rats-result.xml vera-result.xml
valgrind-result-memcheck.xml cppcheck-result.xml

The files are modified in place.

Hope this is helpful to someone else while this problem gets figured out.

Gavin S

On Thu, Apr 17, 2014 at 1:21 PM, Jorge Costa notifications@github.comwrote:

before anything, we need to make sure all the implementation is in
accordance with the guidelines here
http://docs.codehaus.org/display/SONAR/API+Changes.


Reply to this email directly or view it on GitHubhttps://github.com//issues/160#issuecomment-40758209
.

@wenns wenns added duplicate and removed duplicate labels May 4, 2014
@jmecosta
Copy link
Member

jmecosta commented May 4, 2014

Fixed via #102

@jmecosta jmecosta closed this as completed May 4, 2014
@wenns wenns added this to the M 0.9.1 milestone May 4, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants