jQAssistant / jqassistant

Your Software. Your Structures. Your Rules.
https://jqassistant.org/
GNU General Public License v3.0
198 stars 35 forks source link

SonarQube Plugin - creation of sonar issues #50

Closed kaszuster closed 10 years ago

kaszuster commented 10 years ago

Right now the SonarQube plugin has two major and one minor flaw:

  1. A constraint that is violated multiple times, results in only one sonar issue. It should create an issue for every violation that is found.
  2. The sonar issue is not liked to the source code. It should be possible to link an issue to at least a class. Linking an issue to the node (package, class, property, method, etc.) that is returned by the cypher constraint is required or thought desirable.
  3. Minor flaw: The input field of the cypher statement within SonarQube should be a text area and the imported statement (from rules.xml) should be formatted the way it is in the xml file. (moved to separate ticket #62)
DirkMahler commented 10 years ago

There's a first implemenation available for the first two bullets (one issue per violation and linking to java classes and packages). Can you verify if it works for you and provide feedback?

kaszuster commented 10 years ago

First version works like a charm.

Here is one additional remark: The way jQA issues and default sonar issues are displayed differs a little:

1 jQA issues display information that are stored in the report xml.

2 The default issues display some kind of advice in the description area.

I would suggest to display the description of the constraint as the description of the created issue.

DirkMahler commented 10 years ago

The rule description is now rendered as part of the sonar issue. Note that the jQA permalink provided by the sonar quality profile has changed from

http://localhost:9000/profiles/export?format=jqassistant&language=java&name=MyQualityProfile

to

http://localhost:9000/profiles/export?format=jQAssistant&language=java&name=MyQualityProfile

(i.e. only lower case letters for jqassistant)