Generic Language Sensor

Hi,

there are now some sensors that support “generic” data from external tools (Generic Issue Format, Generic Test Data, …).

How can these sensors be used with non-supported programming languages? We use e.g. Smalltalk, Matlab or LUA and are looking for a way to read the source code into SonarQube.

Is there something like “Generic Language”: Some kind of plain text format to index the source code and then assign and display more data?

Regards
Günter

Hi Guenter,

Sorry, this doesn’t exist.

 
:woman_shrugging:
Ann

Hi Ann,

Would you support such a sensor and add it to the Marketplace?

Regards,
Günter

Hi Guenter,

I think that what you’re asking for is essentially a generic language parser. And as I understand it, that’s kinda like perpetual motion: easy to say, hard to do.

 
Ann

Hi Ann,

The simplest solution would look like this, that an additional plugin defines the programming language “Generic”, then you can assign file extensions via the plugin of the programming language and thus define the files that should be indexed. Finally, the files are then read in as “plain text”.

This means that no syntax highlighting and no metrics are supported (except LOC), but issues can already be assigned.

To assign the coverage you have to find out the Executable Lines. In the simplest case everything is executable that is not an empty line and not a comment. Comments can be easily found out via regex and can be configured as required…

The steps described in Supporting New Languages are not all needed if you only want to import reports from external tools.

What do you think?

Regards,
Günter

Hi Guenter,

Okay, understanding your expectations, this goes from impossible to intriguing. I’m going to move this to the feature request category & I’ve referred it internally. Obviously no promises tho.

 
Ann