Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [linuxtools-dev] Sonar configured for Linux Tools master

Hi Alex

see my answer below.

Thanks
Bernd

On Mon, Nov 12, 2012 at 11:05 AM, akurtakov <akurtakov@xxxxxxxxx> wrote:
> Hi Bernd,
>
>
> On Mon, Nov 12, 2012 at 5:58 PM, Bernd Hufmann <bhufmann@xxxxxxxxx> wrote:
>>
>> Hi Alexander
>>
>> I'm happy to see that Eclipse is now using Sonar and the Linux Tools
>> project is using it, too. It's a great tool to statically analyse the
>> quality of the source code. We (LTTng guys) have been using Sonar
>> internally for a while and I was responsible for the setup.
>>
>> I noticed in the Sonar results at Eclipse that the test plug-ins are
>> also analysed. This can be avoided by adding an exclusion pattern to
>> the sonar properties. Just add
>> -Dsonar.exclusions="**/tests/**,**/test/**,**/stubs/**" to the
>> "Additional properties" of the Sonar advanced configuration section of
>> the Hudson job. Note that this pattern works well for all LTTng test
>> plugins.
>
>
> Will this exclusion exclude from all checks ? I mean while I would like to
> see tests excluded from code coverage, it might not be good idea to exclude
> them entirely. For me tests are integral part of the codebase and should
> obey the same rules. So I can't decide myself what is better and I would
> love to hear others opinion and if the majority of contributors want to
> exclude tests I'll add the exclusions.
It only means that the matching java packages are not analysed by
Sonar. For example, no code violations (e.g findbugs) are reported in
Sonar for the matching packages. I prefer to have violation reports,
code coverage report and other reports only for the delivered source
code and not for the test code itself. The code coverage is based on
the test case execution and it's result. The -Dsonar.exclusions
doesn't omit the test execution and the code coverage report. Maybe
you can try it and see the difference.

>
>>
>>
>> Just for curiosity, which code coverage plug-in for Sonar is used at
>> Eclipse? I always had to use JaCoCo for Eclipse plug-ins. All others,
>> I wasn't able to get it work. Please let me know.
>
>
> Jacoco is configured in master to produce its results even if not analyzed
> by Sonar.
>
> Regards,
> Alex
>
>>
>>
>> Best Regards
>> Bernd
>>
>> On Fri, Nov 2, 2012 at 8:26 AM, Aleksandar Kurtakov <akurtako@xxxxxxxxxx>
>> wrote:
>> > Hi everyone,
>> > We have sonar functional for Linux Tools. See
>> > https://dev.eclipse.org/sonar/dashboard/index/org.eclipse.linuxtools:linuxtools-parent
>> > . We don't look good in the code coverage area 16.1% branch coverage so
>> > everyone please pay bigger attention to it and let's improve our testing for
>> > the 2.0 release significantly.
>> > P.S. LTTng guys, I know master doesn't make much sense for you but with
>> > 1.2 release coming soon I would prefer to not configure one more job just
>> > for one month.
>> >
>> > Alexander Kurtakov
>> > Red Hat Eclipse team
>> >
>> > _______________________________________________
>> > linuxtools-dev mailing list
>> > linuxtools-dev@xxxxxxxxxxx
>> > https://dev.eclipse.org/mailman/listinfo/linuxtools-dev
>> _______________________________________________
>> linuxtools-dev mailing list
>> linuxtools-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/linuxtools-dev
>
>
>
> _______________________________________________
> linuxtools-dev mailing list
> linuxtools-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/linuxtools-dev
>


Back to the top