Is there a plugin for parsing and integrating Matlab in Sonarqube?

1.3k views Asked by At
  1. Does someone know, where I can find a plugin for parsing and integrating Matlab
    in Sonarqube ?

  2. If I have got or written this plugin, can I use the internal PMD runner of Sonarqube to check created Custom Rules (XPath) for Matlab ?
    Or do I have to write an extra "parser" for extending PMD with Matlab ?

Thank you very much in advance!


EDIT

Okay, I am still thinking about it. Like it seems, I have to write/extend a matlab grammar, if I want to use PMD (with JavaCC I can generate parser and lexer).

But before I do this, can I also generate parser and lexer for Sonarqube with the created grammar and a generator (e.g. ANTLR) ?

1

There are 1 answers

2
Dinesh Bolkensteyn On BEST ANSWER

There is no Matlab plugin for SonarQube.

If you decide to develop the plugin yourself (which is not a small undertaking), then you will not need PMD. Have a look at the PHP or CSS plugins source code to know how to get started:

Alternatively, you can also add support of the Matlab language to PMD, and then develop a SonarQube "Matlab PMD" plugin. This does not make sense, unless you really want to be integrated with PMD for some reason. There seems currently to be very limited Matlab support in PMD http://pmd.sourceforge.net/pmd-5.3.2/pmd-matlab/index.html - i.e. just a lexer, but no parser nor rules.