Custom Decorator to capture violations

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Custom Decorator to capture violations

SureshP
HI,

I am using Sonar 3.4.1 in Linux machine.

I have created a custom Decorator to get the Violations generated for Java application.

  public void decorate(Resource resource, DecoratorContext context) {
...
}

I am analying a Java application which has 3 .java files.

Ideally the decorate() should be called 3 times, with Resource name as dot separated qualified name.
But decorate() method is called six times. ie., 3 times with Resource name as dot separated qualified name and 3 times with Resource name as slash separated name with .java extension.

The violations (context.getViolations()) are not available for dot separated names. Rather violations can be retrieved for slash separated resource names.

Can you guide me to resolve this issue.

Thanks
Suresh
Reply | Threaded
Open this post in threaded view
|

Re: Custom Decorator to capture violations

David Racodon-2
Hi Suresh,

This question should be posted on the developer mailing list. See http://www.sonarqube.org/resources/join-our-community/.

Thanks for your understanding

Regards,


David RACODON | SonarSource
Senior Consultant

---------------------------------------------
  Sign up to our newsletter here!
---------------------------------------------


On Tue, Nov 5, 2013 at 3:55 PM, SureshP <[hidden email]> wrote:
HI,

I am using Sonar 3.4.1 in Linux machine.

I have created a custom Decorator to get the Violations generated for Java
application.

/  public void decorate(Resource resource, DecoratorContext context) {
...
}/
I am analying a Java application which has 3 .java files.

Ideally the decorate() should be called 3 times, with Resource name as dot
separated qualified name.
But decorate() method is called six times. ie., 3 times with Resource name
as dot separated qualified name and 3 times with Resource name as slash
separated name with .java extension.

The violations (context.getViolations()) are not available for dot separated
names. Rather violations can be retrieved for slash separated resource
names.

Can you guide me to resolve this issue.

Thanks
Suresh



--
View this message in context: http://sonarqube.15.x6.nabble.com/Custom-Decorator-to-capture-violations-tp5018703.html
Sent from the SonarQube Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email