[sonar-dev] From external source to Sonar runner: what is the best way to do it?

classic Classic list List threaded Threaded
3 messages Options
fge
Reply | Threaded
Open this post in threaded view
|

[sonar-dev] From external source to Sonar runner: what is the best way to do it?

fge
Hello,

I have a "little" problem which is quite peculiar...

The basic process I need to accomplish is this:

1. extract a "digested" form of the source files from some medium;
2. generate the source files from this digested form;
3. run the sonar-runner on the generated source files.

Now, I can do 1 and 2. But the problem I have is that I need to do 3
in a platform independent manner as much as possible. Therefore my
current inclination is to have it done in pure Java, which means
invoking the sonar runner from Java code.

First, I guess this is doable but how?

Second, is there a better plan? I know that Sonar has SCM plugins but
as far as I understand them so far they are mostly here for annotation
purposes, they have no active role in fetching sources etc; or am I
mistaken?

Regards,
--
Francis Galiegue, [hidden email], https://github.com/fge
JSON Schema in Java: http://json-schema-validator.herokuapp.com
Parsers in pure Java: https://github.com/fge/grappa

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: [sonar-dev] From external source to Sonar runner: what is the best way to do it?

Julien HENRY
Hi Francis,

Sorry for late reply but for embedding SonarQube Runner there is an API that is called SonarQube Runner API :)

Look for example how it is done in the Ant task:

++

Julien

2015-04-24 12:01 GMT+02:00 Francis Galiegue <[hidden email]>:
Hello,

I have a "little" problem which is quite peculiar...

The basic process I need to accomplish is this:

1. extract a "digested" form of the source files from some medium;
2. generate the source files from this digested form;
3. run the sonar-runner on the generated source files.

Now, I can do 1 and 2. But the problem I have is that I need to do 3
in a platform independent manner as much as possible. Therefore my
current inclination is to have it done in pure Java, which means
invoking the sonar runner from Java code.

First, I guess this is doable but how?

Second, is there a better plan? I know that Sonar has SCM plugins but
as far as I understand them so far they are mostly here for annotation
purposes, they have no active role in fetching sources etc; or am I
mistaken?

Regards,
--
Francis Galiegue, [hidden email], https://github.com/fge
JSON Schema in Java: http://json-schema-validator.herokuapp.com
Parsers in pure Java: https://github.com/fge/grappa

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



fge
Reply | Threaded
Open this post in threaded view
|

Re: [sonar-dev] From external source to Sonar runner: what is the best way to do it?

fge
Hello,

On Tue, May 12, 2015 at 4:12 PM, Julien HENRY
<[hidden email]> wrote:

> Hi Francis,
>
> Sorry for late reply but for embedding SonarQube Runner there is an API that
> is called SonarQube Runner API :)
>
> Look for example how it is done in the Ant task:
> https://github.com/SonarSource/sonar-ant-task/blob/master/src/main/java/org/sonar/ant/SonarTask.java#L52
>
> ++
>

Nice! I'm going to study that code...

(what does the .unmask() method do?)

Regards,
--
Francis Galiegue, [hidden email], https://github.com/fge
JSON Schema in Java: http://json-schema-validator.herokuapp.com
Parsers in pure Java: https://github.com/fge/grappa

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email