OpenEdge plugin for SonarQube

462 views
Skip to first unread message

Gilles QUERRET

unread,
May 11, 2016, 8:32:09 AM5/11/16
to sona...@googlegroups.com
Hello,


I just would like to inform that I've released a plugin for the OpenEdge language ( http://www.progress.com ). While the language has been created almost 30 years ago, it's still used, maintained and improved by Progress Software. This language is mostly used in business applications such as ERP systems.
Source code and binaries are available at https://github.com/Riverside-Software/sonar-openedge (LGPL 3.0). Documentation will be moved soon to the GitHub wiki.

A few technical points and questions who may be of interest for plugin developers:
* The parser is written in ANTLR2 (for some files) and ANTLR4 (for others). Given the size of the grammar, migrating to SSLR wasn't an option.
* Integration of both versions of ANTLR is done by using maven-shade-plugin, and by relocating those classes in the .api. package so the AST is available from external plugin ; it's possible to write custom rules in a separate plugin, and by registering them onto the main one. The behavior is somewhat similar to the sslr-squid module, but having it work with ANTLR was quite a challenge :-)
* The plugin is for SQ 5.4+ ; what is the next LTS version ? And is there an expected release date ?
* The code highlighting mechanism is still done using the CodeColorizerFormat class. We had a (very quick) look at the new Highlighting classes, but were unable to understand how to "glue" everything and migrate the existing classes. Is there a "Highlighting for dummies" somewhere ?
* OpenEdge codebases are usually quite large (several millions SLOC). This means that in several locations (the Code tab being the most annoying one), it's not possible see all directories and files. Is there a way to control the number of lines displayed here ?
* The roadmap (at http://www.sonarqube.org/roadmap/ ) mentions a cartography feature. Is it still planned ?
* A technical question which may not be related to SQ at all, but I don't know enough of Maven and the sonar-packaging plugin to be sure : I'm getting a different JAR file for the plugin when I compile this multi-module project with Maven 3.0 and Maven 3.3. Using Maven 3.0 leads to the right result, while Maven 3.3 generates an invalid JAR file as it adds too many dependencies in the META-INF/lib folder. Does that spark an idea to anybody ? Otherwise, I'll try to report the problem with more information.


And finally, I'd like to congratulate the entire team for this fantastic tool !

Gilles

Julien HENRY

unread,
May 12, 2016, 2:43:53 AM5/12/16
to SonarQube
Hi Gilles,


* The plugin is for SQ 5.4+ ; what is the next LTS version ? And is there an expected release date ?
Next LTS will be 5.6 and is expected to be released in June.
 
* The code highlighting mechanism is still done using the CodeColorizerFormat class. We had a (very quick) look at the new Highlighting classes, but were unable to understand how to "glue" everything and migrate the existing classes. Is there a "Highlighting for dummies" somewhere ?

You can have a look at the latest API usage here: https://github.com/SonarSource/sonarqube/blob/master/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/lang/SyntaxHighlightingSensor.java This API will become the official one in 5.6.
 
* OpenEdge codebases are usually quite large (several millions SLOC). This means that in several locations (the Code tab being the most annoying one), it's not possible see all directories and files. Is there a way to control the number of lines displayed here ?

Would be interesting to give some precise figures as well as your hardware specs so that we can investigate the performance issue.
 
* The roadmap (at http://www.sonarqube.org/roadmap/ ) mentions a cartography feature. Is it still planned ?

Not in 2016 AFAIK.
 
* A technical question which may not be related to SQ at all, but I don't know enough of Maven and the sonar-packaging plugin to be sure : I'm getting a different JAR file for the plugin when I compile this multi-module project with Maven 3.0 and Maven 3.3. Using Maven 3.0 leads to the right result, while Maven 3.3 generates an invalid JAR file as it adds too many dependencies in the META-INF/lib folder. Does that spark an idea to anybody ? Otherwise, I'll try to report the problem with more information.

I'm interested in a detailed report since I'm not aware of such issue.
 

And finally, I'd like to congratulate the entire team for this fantastic tool !

Thanks! 

++

Julien

Scott B.

unread,
May 12, 2016, 7:43:59 AM5/12/16
to SonarQube
Hi Julien.


On Thursday, May 12, 2016 at 3:43:53 AM UTC-3, Julien HENRY wrote:

* OpenEdge codebases are usually quite large (several millions SLOC). This means that in several locations (the Code tab being the most annoying one), it's not possible see all directories and files. Is there a way to control the number of lines displayed here ?

Would be interesting to give some precise figures as well as your hardware specs so that we can investigate the performance issue.


I can't speak for Gilles, but I don't think that he is reporting a performance issue. It is a limitation of the SonarQube UI (older versions have the same limitation).

Example:



As you can see, SonarQube only show 100 files, The only way to open SwingConstants.java is using the search.

Gilles QUERRET

unread,
May 12, 2016, 8:01:20 AM5/12/16
to sona...@googlegroups.com

* The code highlighting mechanism is still done using the CodeColorizerFormat class. We had a (very quick) look at the new Highlighting classes, but were unable to understand how to "glue" everything and migrate the existing classes. Is there a "Highlighting for dummies" somewhere ?

You can have a look at the latest API usage here: https://github.com/SonarSource/sonarqube/blob/master/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/lang/SyntaxHighlightingSensor.java This API will become the official one in 5.6.

Thanks, will have a look !

* OpenEdge codebases are usually quite large (several millions SLOC). This means that in several locations (the Code tab being the most annoying one), it's not possible see all directories and files. Is there a way to control the number of lines displayed here ?

Would be interesting to give some precise figures as well as your hardware specs so that we can investigate the performance issue.

My sentence wasn’t really clear ; in fact, it’s not a performance problem, but just a problem to see all entries. The following example (only a few lines in the screenshot) contains 250 directories approximately, but only the first 100 entries are displayed.
Inline image 1
Browsing code and issues for a specific directory is difficult to achieve as I don’t think there’s a way to filter by directory. If I use the filter “interface”, only files matching “interface” are displayed, but not the directory src/maia/ba/interface (second line of the screenshot) and src/maia/dbdc/interface (which is not even listed in the UI due to the 100 items limitation).

Another example is in the issues filter :
Inline image 2
Only the first 15 directories are displayed, when there might be a lot more. To my mind, there’s no need to display every entry (as it will just make the filter completely unreadable and useless), but the ability to change the number of items would be a nice to have !

* The roadmap (at http://www.sonarqube.org/roadmap/ ) mentions a cartography feature. Is it still planned ?

Not in 2016 AFAIK.

:-(

 
* A technical question which may not be related to SQ at all, but I don't know enough of Maven and the sonar-packaging plugin to be sure : I'm getting a different JAR file for the plugin when I compile this multi-module project with Maven 3.0 and Maven 3.3. Using Maven 3.0 leads to the right result, while Maven 3.3 generates an invalid JAR file as it adds too many dependencies in the META-INF/lib folder. Does that spark an idea to anybody ? Otherwise, I'll try to report the problem with more information.

I'm interested in a detailed report since I'm not aware of such issue.

In case you have time, you can reproduce the problem by cloning the Git repo and executing mvn package with Maven 3.0.5 and 3.3.9. Or let me know if you want me to create a simple test case, that might be easier to debug. The difference is here :

$ jar tf oe-mvn3.0/openedge-plugin/target/sonar-openedge-plugin-1.9.1.jar | grep /lib/
META-INF/lib/
META-INF/lib/commons-lang-2.6.jar
META-INF/lib/slf4j-api-1.7.19.jar
META-INF/lib/openedge-checks-shaded-1.3.4.jar
META-INF/lib/commons-io-2.4.jar
$ jar tf oe-mvn3.3/openedge-plugin/target/sonar-openedge-plugin-1.9.1.jar | grep /lib/
META-INF/lib/
META-INF/lib/antlr-2.7.7.jar
META-INF/lib/commons-lang-2.6.jar
META-INF/lib/slf4j-api-1.7.19.jar
META-INF/lib/guava-19.0.jar
META-INF/lib/openedge-checks-shaded-1.3.4.jar
META-INF/lib/listing-parser-1.3.6.jar
META-INF/lib/proparse-1.0.6.jar
META-INF/lib/database-parser-1.1.10.jar
META-INF/lib/antlr4-runtime-4.5.2-1.jar
META-INF/lib/javax.inject-1.jar
META-INF/lib/guice-4.0.jar
META-INF/lib/commons-io-2.4.jar
META-INF/lib/openedge-checks-1.3.4.jar
META-INF/lib/aopalliance-1.0.jar

In short, the openedge-checks-shaded module (which relocates antlr in the .api. package) depends on openedge-checks, and generates a dependency-reduced-pom.xml file. Then openedge-plugin then depends on openedge-checks-shaded, and thus openedge-checks dependencies shouldn’t be imported ; this is working fine with Maven 3.0, but not with 3.3. Another thing I’ve found during my tests is that this only happens when building the multi-module project ; when building openedge-plugin alone, the JAR file is correctly created. Given those facts, I’m really not sure the sonar-packaging-plugin could be the cause…

--
Gilles QUERRET

Julien HENRY

unread,
May 12, 2016, 9:15:19 AM5/12/16
to SonarQube
Regarding Maven packaging plugin issue I think you are bitten by:

Gilles QUERRET

unread,
May 12, 2016, 9:54:22 AM5/12/16
to sona...@googlegroups.com
Exactly what I was looking for, thanks for the link !

Gilles

--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/43b27506-c997-47dc-9989-53cb9d909d4b%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Gilles QUERRET

Riverside Software
15d route de Bellevue • 69440 Mornant • France
Mob : +33 662.525.532

stas.v...@sonarsource.com

unread,
May 12, 2016, 11:38:27 AM5/12/16
to SonarQube
Hello,

In the SonarQube 5.6 it becomes possible to see more results on the Code page (see ticket for the reference).

Gilles QUERRET

unread,
May 12, 2016, 12:09:37 PM5/12/16
to sona...@googlegroups.com
Thanks ! Is it controlled by a pagination system ?

Gilles

--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Gilles QUERRET

unread,
May 12, 2016, 2:55:51 PM5/12/16
to sona...@googlegroups.com
Reading the title of the issue gave me the answer :)

G. Ann Campbell

unread,
May 16, 2016, 2:47:34 PM5/16/16
to SonarQube
FYI, I've added this plugin to the docs. Thanks for telling us about it and being willing to share. 


:-)
Ann
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+unsubscribe@googlegroups.com.
--
Gilles QUERRET

Riverside Software
15d route de Bellevue • 69440 Mornant • France
Mob : +33 662.525.532

Gilles QUERRET

unread,
May 17, 2016, 2:08:13 AM5/17/16
to sona...@googlegroups.com
Thanks Ann !

Gilles

Ann
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
--
Gilles QUERRET

Riverside Software
15d route de Bellevue • 69440 Mornant • France
Mob : +33 662.525.532



--
Gilles QUERRET

Riverside Software
15d route de Bellevue • 69440 Mornant • France
Mob : +33 662.525.532

--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/49221290-ca23-4e94-afb9-45f199a6c124%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages