SonarJ Plugin Rules

4 messages Options
Embed this post
Permalink
Alexander von Zitzewitz () SonarJ Plugin Rules
Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
SonarJ Plugin Rules Hello !

Our Maven plugin creates a list of Architecture and Threshold violations together with file names and line numbers. I would like to add these as violations to Sonar, but all the classes like RuleRepository are not documented.

Basically I would create a couple of rules:

Architecture Violation
Interface Violation
Threshold Violation

Architecture Violations can have different priorities, e.g. a layer violation is worse then a subsystem violation.

So how do I do that?

Amnother questions is if you support project modules. A SonarJ project can be split up into several subprojects. Currently I don’t know how to map that into the Sonar world.

Best regards

Alexander von Zitzewitz



www.hello2morrow.com

SonarJ Elevator Pitch: http://www.hello2morrow.com/videos/benefits

+1 (877) 294-6327



Olivier Gaudin () Re: SonarJ Plugin Rules
Reply Threaded More More options
Print post
Permalink
Hello Alexander,

Regarding the repository, I would recommend you have a look at the taglist plugin as it does pretty much what you want to do for tags.

Sonar handles multi-module projects as it integrated with Maven. What is it you need exactly ? Know where you are in the project ?

Olivier



On Wed, Oct 14, 2009 at 12:33 AM, Alexander von Zitzewitz <[hidden email]> wrote:
Hello !

Our Maven plugin creates a list of Architecture and Threshold violations together with file names and line numbers. I would like to add these as violations to Sonar, but all the classes like RuleRepository are not documented.

Basically I would create a couple of rules:

Architecture Violation
Interface Violation
Threshold Violation

Architecture Violations can have different priorities, e.g. a layer violation is worse then a subsystem violation.

So how do I do that?

Amnother questions is if you support project modules. A SonarJ project can be split up into several subprojects. Currently I don’t know how to map that into the Sonar world.

Best regards

Alexander von Zitzewitz



www.hello2morrow.com

SonarJ Elevator Pitch: http://www.hello2morrow.com/videos/benefits

+1 (877) 294-6327




Alexander von Zitzewitz () Re: SonarJ Plugin Rules
Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
Re: [sonar-dev] SonarJ Plugin Rules Hello Olivier !

In SonarJ you split up a larger system into subprojects and describe the overall architecture in one .sonarj file. Now if I am analyzing the report created out of this file (which would be probably located with the root pom), I want to be able to access the Maven child modules and add metrics to them. I also want to be able to access their resources (packages, java  files) to add violations.

Is that possible?

Regards

Alexander

On 10/14/09 3:02 AM, "Olivier Gaudin" <olivier.gaudin@...> wrote:

Hello Alexander,

Regarding the repository, I would recommend you have a look at the taglist plugin as it does pretty much what you want to do for tags.

Sonar handles multi-module projects as it integrated with Maven. What is it you need exactly ? Know where you are in the project ?

Olivier



On Wed, Oct 14, 2009 at 12:33 AM, Alexander von Zitzewitz <a.zitzewitz@...> wrote:
Hello !

Our Maven plugin creates a list of Architecture and Threshold violations together with file names and line numbers. I would like to add these as violations to Sonar, but all the classes like RuleRepository are not documented.

Basically I would create a couple of rules:

Architecture Violation
Interface Violation
Threshold Violation

Architecture Violations can have different priorities, e.g. a layer violation is worse then a subsystem violation.

So how do I do that?

Amnother questions is if you support project modules. A SonarJ project can be split up into several subprojects. Currently I don’t know how to map that into the Sonar world.

Best regards

Alexander von Zitzewitz



www.hello2morrow.com <http://www.hello2morrow.com>

SonarJ Elevator Pitch: http://www.hello2morrow.com/videos/benefits

+1 (877) 294-6327





Alexander von Zitzewitz



www.hello2morrow.com

SonarJ Elevator Pitch: http://www.hello2morrow.com/videos/benefits

+1 (877) 294-6327




Olivier Gaudin () Re: SonarJ Plugin Rules
Reply Threaded More More options
Print post
Permalink
Hello,

Yes, you can use a Decorator that will browse the whole tree of resource bottom up.

Olivier


On Wed, Oct 14, 2009 at 4:18 PM, Alexander von Zitzewitz <[hidden email]> wrote:
Hello Olivier !

In SonarJ you split up a larger system into subprojects and describe the overall architecture in one .sonarj file. Now if I am analyzing the report created out of this file (which would be probably located with the root pom), I want to be able to access the Maven child modules and add metrics to them. I also want to be able to access their resources (packages, java  files) to add violations.

Is that possible?

Regards

Alexander


On 10/14/09 3:02 AM, "Olivier Gaudin" <olivier.gaudin@...> wrote:

Hello Alexander,

Regarding the repository, I would recommend you have a look at the taglist plugin as it does pretty much what you want to do for tags.

Sonar handles multi-module projects as it integrated with Maven. What is it you need exactly ? Know where you are in the project ?

Olivier



On Wed, Oct 14, 2009 at 12:33 AM, Alexander von Zitzewitz <a.zitzewitz@...> wrote:
Hello !

Our Maven plugin creates a list of Architecture and Threshold violations together with file names and line numbers. I would like to add these as violations to Sonar, but all the classes like RuleRepository are not documented.

Basically I would create a couple of rules:

Architecture Violation
Interface Violation
Threshold Violation

Architecture Violations can have different priorities, e.g. a layer violation is worse then a subsystem violation.

So how do I do that?

Amnother questions is if you support project modules. A SonarJ project can be split up into several subprojects. Currently I don’t know how to map that into the Sonar world.

Best regards

Alexander von Zitzewitz



www.hello2morrow.com <http://www.hello2morrow.com>

SonarJ Elevator Pitch: http://www.hello2morrow.com/videos/benefits

+1 (877) 294-6327





Alexander von Zitzewitz



www.hello2morrow.com

SonarJ Elevator Pitch: http://www.hello2morrow.com/videos/benefits

+1 (877) 294-6327