You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by ajs6f <aj...@apache.org> on 2019/04/15 13:44:37 UTC

Sonar?

I see that Apache has Sonar code analysis services at: https://builds.apache.org/analysis and I wasn't able to find Jena there. It would be interesting to see what Sonar says about the codebase. Of course it has to be taken with a grain of salt, but it's often useful.

Before I investigate turning Sonar on for our codebase, any thoughts/objections/information? Am I missing anything (like we already have it turned on and I just didn't see it, which happens all the time)?

ajs6f


Re: Sonar?

Posted by Aaron Coburn <aa...@gmail.com>.
It is possible to exclude specific modules from Sonar's analysis (I do this
with some of my own projects). The documentation for this is here:
https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+Maven#AnalyzingwithSonarQubeScannerforMaven-ExcludingamodulefromSonarQubeanalysis

Basically, you define this property in the module you want to skip:
<sonar.skip>true</sonar.skip>

Aaron


On Tue, Apr 16, 2019 at 8:49 AM Rob Vesse <rv...@dotnetrdf.org> wrote:

> Yep
>
> A lot of the bigger projects (often those with commercial backers) that
> have a much higher rate of change are often very nit-picky about things
> like code style e.g. Apache Spark.  I've on occasion spent weeks going back
> and forth on style nits in the past with PRs for Spark!
>
> I can see where those projects are coming from, if you have a high rate of
> PRs and changes a consistent code style reduces the unnecessary noise in
> code reviews but it tends to be very unwelcoming to new contributors.
>
> So yes I'd never want us to implement that for Jena
>
> Rob
>
> On 16/04/2019, 13:10, "ajs6f" <aj...@apache.org> wrote:
>
>     Whoa, wait what?! Are there Apache projects that do that? (Require
> some certain score on this kind of analysis for a contribution?) I
> sincerely hope not, and I'd be the first -1 here at Jena against any such
> suggestion. That would be literally thoughtless.
>
>
>
>
>

Re: Sonar?

Posted by Rob Vesse <rv...@dotnetrdf.org>.
Yep

A lot of the bigger projects (often those with commercial backers) that have a much higher rate of change are often very nit-picky about things like code style e.g. Apache Spark.  I've on occasion spent weeks going back and forth on style nits in the past with PRs for Spark!

I can see where those projects are coming from, if you have a high rate of PRs and changes a consistent code style reduces the unnecessary noise in code reviews but it tends to be very unwelcoming to new contributors.

So yes I'd never want us to implement that for Jena

Rob

On 16/04/2019, 13:10, "ajs6f" <aj...@apache.org> wrote:

    Whoa, wait what?! Are there Apache projects that do that? (Require some certain score on this kind of analysis for a contribution?) I sincerely hope not, and I'd be the first -1 here at Jena against any such suggestion. That would be literally thoughtless.





Re: Sonar?

Posted by ajs6f <aj...@apache.org>.
> On Apr 16, 2019, at 7:18 AM, Andy Seaborne <an...@apache.org> wrote:
> 
> https://sonarcloud.io/dashboard?id=jena-db-tdb2
> 
> which is new code for TDB2 rewritten for jena-dboe-storage.
> 
> Some useful points, significant amount of noise to manage.
> So IMO it is informative, and best used when there is active development in the area.  Diffs in numbers can be useful, the overall assessment of old code, rather less so and risks being a burden on that old code (where tests are important and IMO where any time is better spent).

That's enough for me to want to turn it on. I agree that it is sometimes useful, sometimes just noise, but for me, having it turned on and being able to just go look at a webpage when that seems interesting is a lot easier (and more likely to be useful) than having to remember how to run it and then running it and then going to look for the report. As for the less useful reports from old code, we can simply ignore that or (depending on how much time I have) I can try to customize the settings across the codebase to minimize the junk from older styles. It should be easy enough to just turn off any notifications so that we don't get a barrage of junk every time someone makes a commit near older code. We can turn them on if or when that seems useful. Cool?

> Would we insist on it for contributions? Hoep not - I'd rather see contributions and tests. And if we don't insist, then who cleans up?

Whoa, wait what?! Are there Apache projects that do that? (Require some certain score on this kind of analysis for a contribution?) I sincerely hope not, and I'd be the first -1 here at Jena against any such suggestion. That would be literally thoughtless.

It sounds like there are no -1s (maybe a bit of skepticism from Andy as to how generally useful it could be :) ), so I'll see what it would take to turn it on (guessing a ticket to INFRA) and report back.

ajs6f

>    Andy
> 
> On 16/04/2019 11:37, Andy Seaborne wrote:
>> TBH I don't think applying it overall is much help.
>> There is tradeoff on old code between cleaning it and leaving it, warts and all, untouched so git history is not obscured (and "smells" I glanced at looked like "current style").
>> I actually find the Eclipse "Show revision information" quite useful.
>> It can be run as Bruno has pointed to.
>> ---
>> Can it be focused on one part of the code base? Pointing to an active area where change is already happening might be more useful.
>>     Andy
>> On 15/04/2019 22:44, Bruno P. Kinoshita wrote:
>>>   I feel like we had this discussion before... but could be in a different project. I ran SonarQube a few times against Jena's codebase in the past, but haven't done it in a while.
>>> They also offer a cloud service similar to Travis, called SonarCloud.io: https://sonarcloud.io/dashboard?id=org.apache.jena%3Ajena
>>> +1 from me
>>> Bruno
>>> 
>>>      On Tuesday, 16 April 2019, 1:54:30 am NZST, ajs6f <aj...@apache.org> wrote:
>>>   I see that Apache has Sonar code analysis services at: https://builds.apache.org/analysis and I wasn't able to find Jena there. It would be interesting to see what Sonar says about the codebase. Of course it has to be taken with a grain of salt, but it's often useful.
>>> 
>>> Before I investigate turning Sonar on for our codebase, any thoughts/objections/information? Am I missing anything (like we already have it turned on and I just didn't see it, which happens all the time)?
>>> 
>>> ajs6f
>>> 


Re: Sonar?

Posted by Andy Seaborne <an...@apache.org>.
https://sonarcloud.io/dashboard?id=jena-db-tdb2

which is new code for TDB2 rewritten for jena-dboe-storage.

Some useful points, significant amount of noise to manage.

So IMO it is informative, and best used when there is active development 
in the area.  Diffs in numbers can be useful, the overall assessment of 
old code, rather less so and risks being a burden on that old code 
(where tests are important and IMO where any time is better spent).

Would we insist on it for contributions? Hoep not - I'd rather see 
contributions and tests. And if we don't insist, then who cleans up?

     Andy

On 16/04/2019 11:37, Andy Seaborne wrote:
> TBH I don't think applying it overall is much help.
> 
> There is tradeoff on old code between cleaning it and leaving it, warts 
> and all, untouched so git history is not obscured (and "smells" I 
> glanced at looked like "current style").
> 
> I actually find the Eclipse "Show revision information" quite useful.
> 
> It can be run as Bruno has pointed to.
> 
> ---
> 
> Can it be focused on one part of the code base? Pointing to an active 
> area where change is already happening might be more useful.
> 
>      Andy
> 
> On 15/04/2019 22:44, Bruno P. Kinoshita wrote:
>>   I feel like we had this discussion before... but could be in a 
>> different project. I ran SonarQube a few times against Jena's codebase 
>> in the past, but haven't done it in a while.
>> They also offer a cloud service similar to Travis, called 
>> SonarCloud.io: https://sonarcloud.io/dashboard?id=org.apache.jena%3Ajena
>> +1 from me
>> Bruno
>>
>>      On Tuesday, 16 April 2019, 1:54:30 am NZST, ajs6f 
>> <aj...@apache.org> wrote:
>>   I see that Apache has Sonar code analysis services at: 
>> https://builds.apache.org/analysis and I wasn't able to find Jena 
>> there. It would be interesting to see what Sonar says about the 
>> codebase. Of course it has to be taken with a grain of salt, but it's 
>> often useful.
>>
>> Before I investigate turning Sonar on for our codebase, any 
>> thoughts/objections/information? Am I missing anything (like we 
>> already have it turned on and I just didn't see it, which happens all 
>> the time)?
>>
>> ajs6f
>>

Re: Sonar?

Posted by Andy Seaborne <an...@apache.org>.
TBH I don't think applying it overall is much help.

There is tradeoff on old code between cleaning it and leaving it, warts 
and all, untouched so git history is not obscured (and "smells" I 
glanced at looked like "current style").

I actually find the Eclipse "Show revision information" quite useful.

It can be run as Bruno has pointed to.

---

Can it be focused on one part of the code base? Pointing to an active 
area where change is already happening might be more useful.

     Andy

On 15/04/2019 22:44, Bruno P. Kinoshita wrote:
>   I feel like we had this discussion before... but could be in a different project. I ran SonarQube a few times against Jena's codebase in the past, but haven't done it in a while.
> They also offer a cloud service similar to Travis, called SonarCloud.io: https://sonarcloud.io/dashboard?id=org.apache.jena%3Ajena
> +1 from me
> Bruno
> 
>      On Tuesday, 16 April 2019, 1:54:30 am NZST, ajs6f <aj...@apache.org> wrote:
>   
>   I see that Apache has Sonar code analysis services at: https://builds.apache.org/analysis and I wasn't able to find Jena there. It would be interesting to see what Sonar says about the codebase. Of course it has to be taken with a grain of salt, but it's often useful.
> 
> Before I investigate turning Sonar on for our codebase, any thoughts/objections/information? Am I missing anything (like we already have it turned on and I just didn't see it, which happens all the time)?
> 
> ajs6f
>    
> 

Re: Sonar?

Posted by "Bruno P. Kinoshita" <br...@yahoo.com.br.INVALID>.
 I feel like we had this discussion before... but could be in a different project. I ran SonarQube a few times against Jena's codebase in the past, but haven't done it in a while.
They also offer a cloud service similar to Travis, called SonarCloud.io: https://sonarcloud.io/dashboard?id=org.apache.jena%3Ajena
+1 from me
Bruno

    On Tuesday, 16 April 2019, 1:54:30 am NZST, ajs6f <aj...@apache.org> wrote:  
 
 I see that Apache has Sonar code analysis services at: https://builds.apache.org/analysis and I wasn't able to find Jena there. It would be interesting to see what Sonar says about the codebase. Of course it has to be taken with a grain of salt, but it's often useful.

Before I investigate turning Sonar on for our codebase, any thoughts/objections/information? Am I missing anything (like we already have it turned on and I just didn't see it, which happens all the time)?

ajs6f