Files not analysed appear in Drill Down Result Page

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

Files not analysed appear in Drill Down Result Page

PrathameshMB
Hi All,

I have created a small POC custom plugin, where custom utility analyses only .properties, .json, .txt, .xml files.

In the analyse method :
for(InputFile inputFile : fs.inputFiles(fs.predicates() .hasLanguages("properties", "json", "xml", "txt")))
{
//Logic
}

Hence as per the above logic .java files are getting skipped from being analysed with custom utility and hence getting skipped from getting applied with custom measure.

In the CustomDecorator:
I am checking for the custom metrics in the context. If a custom metrics is in the context for the resource, i am adding values to the custom parent measure. These measures are appearing in the custom widget on the dash board.

Every measure is supported with url_for_drilldown functionality. When i click on any of the custom measure, it navigates to the drill down page where i am getting .properties , .json, .txt, .xml files.

But it also shows .java files from the project.

I have a question: If i have not applied any measure on the Java files, why those files are appearing in my custom drill down menu?

Is there any way where i can filter these java files from appearing in the drill down menu?

Any help is much appreciated, Thanks in advance.

Regards,
Prathamesh
Reply | Threaded
Open this post in threaded view
|

Re: [sonar-dev] Files not analysed appear in Drill Down Result Page

Simon Brandhof
Hi Prathamesh,

What are the values displayed on these Java files ? Zero ?
I suppose that your plugin declares 4 instances of org.sonar.api.resources.Language. You should double-check the list of file suffixes declared on these languages.

Thanks


Simon BRANDHOF | SonarSource
Tech Lead & Co-Founder
http://twitter.com/SimonBrandhof

On 24 April 2015 at 15:52, PrathameshMB <[hidden email]> wrote:
Hi All,

I have created a small POC custom plugin, where custom utility analyses only
.properties, .json, .txt, .xml files.

In the analyse method :
for(InputFile inputFile : fs.inputFiles(fs.predicates()
.hasLanguages("properties", "json", "xml", "txt")))
{
//Logic
}

Hence as per the above logic .java files are getting skipped from being
analysed with custom utility and hence getting skipped from getting applied
with custom measure.

In the CustomDecorator:
I am checking for the custom metrics in the context. If a custom metrics is
in the context for the resource, i am adding values to the custom parent
measure. These measures are appearing in the custom widget on the dash
board.

Every measure is supported with url_for_drilldown functionality. When i
click on any of the custom measure, it navigates to the drill down page
where i am getting .properties , .json, .txt, .xml files.

But it also shows .java files from the project.

I have a question: If i have not applied any measure on the Java files, why
those files are appearing in my custom drill down menu?

Is there any way where i can filter these java files from appearing in the
drill down menu?

Any help is much appreciated, Thanks in advance.

Regards,
Prathamesh




--
View this message in context: http://sonarqube.15.x6.nabble.com/Files-not-analysed-appear-in-Drill-Down-Result-Page-tp5034738.html
Sent from the SonarQube Developers mailing list archive at Nabble.com.

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

    http://xircles.codehaus.org/manage_email