CodeClimate on Foreman core PRs

Hi devs,

We activated CodeClimate analysis on our project some time ago -
https://codeclimate.com/github/theforeman/foreman

It's an useful tool to see how coupled, well coded, etc… your
application is. A while ago it used to be 2.9 IIRC, and it's became
worse over time.

I found it useful to run it on certain PRs manually to detect areas that
can be improved, but it's a bit of a PITA to do it manually. They have a
free open source plan and it can show this information directly on the
PR.

I think it would make sense for Foreman core and other Ruby projects
to use this tool to see how our code quality* improves/gets worse on
each PR. Integrating it is easy and I did it with foreman_cockpit and
foreman_ansible already. I don't have the rights to do it on Foreman
core but even if I did I want others' opinions on it.

You thoughts?

Best,

  • (I know assigning a number to it is not really how it works, but it's
    better than nothing)
··· -- Daniel Lobato Garcia

@dLobatog

GPG: http://keys.gnupg.net/pks/lookup?op=get&search=0x7A92D6DD38D6DE30
Keybase: elobato (Daniel Lobato Garcia) | Keybase

> Hi devs,
>
> We activated CodeClimate analysis on our project some time ago -
> https://codeclimate.com/github/theforeman/foreman
>
> It's an useful tool to see how coupled, well coded, etc… your
> application is. A while ago it used to be 2.9 IIRC, and it's became
> worse over time.
>
> I found it useful to run it on certain PRs manually to detect areas that
> can be improved, but it's a bit of a PITA to do it manually. They have a
> free open source plan and it can show this information directly on the
> PR.
>
> I think it would make sense for Foreman core and other Ruby projects
> to use this tool to see how our code quality* improves/gets worse on
> each PR. Integrating it is easy and I did it with foreman_cockpit and
> foreman_ansible already. I don't have the rights to do it on Foreman
> core but even if I did I want others' opinions on it.

I'm in favour of adding it, it seems useful. It is reflecting the
rubocop/brakeman checks we already have, but of course many are actually
disabled or not being checked because we've not enabled them. This gives
us a way of ensuring the overall style gets better (according to these
metrics) gradually with new code, which is nice. Hopefully this means
some cops can later be enabled with less work.

> http://docs.codeclimate.com/article/213-github-pull-request-integration

This URL is a 404 for me,
http://docs.classic.codeclimate.com/article/213-github-pull-request-integration
seems to work.

··· On 02/06/16 15:54, Daniel Lobato Garcia wrote:


Dominic Cleal
dominic@cleal.org

I get a 404 when I try to open this.

··· On Thu, Jun 02, 2016 at 04:54:30PM +0200, Daniel Lobato Garcia wrote: > http://docs.codeclimate.com/article/213-github-pull-request-integration

Awesome, I think it's yours or Ohad's call then as nobody else has
permission to change settings on core. It took me like 10m to do it on
the repos I mentioned before :slight_smile:

··· On 06/02, Dominic Cleal wrote: > On 02/06/16 15:54, Daniel Lobato Garcia wrote: > > Hi devs, > > > > We activated CodeClimate analysis on our project some time ago - > > https://codeclimate.com/github/theforeman/foreman > > > > It's an useful tool to see how coupled, well coded, etc.. your > > application is. A while ago it used to be 2.9 IIRC, and it's became > > worse over time. > > > > I found it useful to run it on certain PRs manually to detect areas that > > can be improved, but it's a bit of a PITA to do it manually. They have a > > free open source plan and it can show this information directly on the > > PR. > > > > I think it would make sense for Foreman core and other Ruby projects > > to use this tool to see how our code quality* improves/gets worse on > > each PR. Integrating it is easy and I did it with foreman_cockpit and > > foreman_ansible already. I don't have the rights to do it on Foreman > > core but even if I did I want others' opinions on it. > > I'm in favour of adding it, it seems useful. It is reflecting the > rubocop/brakeman checks we already have, but of course many are actually > disabled or not being checked because we've not enabled them. This gives > us a way of ensuring the overall style gets better (according to these > metrics) gradually with new code, which is nice. Hopefully this means > some cops can later be enabled with less work. > > > http://docs.codeclimate.com/article/213-github-pull-request-integration > > This URL is a 404 for me, > http://docs.classic.codeclimate.com/article/213-github-pull-request-integration > seems to work.


Daniel Lobato Garcia

@dLobatog
blog.daniellobato.me
daniellobato.me

GPG: http://keys.gnupg.net/pks/lookup?op=get&search=0x7A92D6DD38D6DE30
Keybase: https://keybase.io/elobato

Sure, I can do it next week if there's no other feedback.

··· On 03/06/16 11:40, Daniel Lobato Garcia wrote: > On 06/02, Dominic Cleal wrote: >> On 02/06/16 15:54, Daniel Lobato Garcia wrote: >>> Hi devs, >>> >>> We activated CodeClimate analysis on our project some time ago - >>> https://codeclimate.com/github/theforeman/foreman >>> >>> It's an useful tool to see how coupled, well coded, etc.. your >>> application is. A while ago it used to be 2.9 IIRC, and it's became >>> worse over time. >>> >>> I found it useful to run it on certain PRs manually to detect areas that >>> can be improved, but it's a bit of a PITA to do it manually. They have a >>> free open source plan and it can show this information directly on the >>> PR. >>> >>> I think it would make sense for Foreman core and other Ruby projects >>> to use this tool to see how our code quality* improves/gets worse on >>> each PR. Integrating it is easy and I did it with foreman_cockpit and >>> foreman_ansible already. I don't have the rights to do it on Foreman >>> core but even if I did I want others' opinions on it. >> >> I'm in favour of adding it, it seems useful. It is reflecting the >> rubocop/brakeman checks we already have, but of course many are actually >> disabled or not being checked because we've not enabled them. This gives >> us a way of ensuring the overall style gets better (according to these >> metrics) gradually with new code, which is nice. Hopefully this means >> some cops can later be enabled with less work. >> >>> http://docs.codeclimate.com/article/213-github-pull-request-integration >> >> This URL is a 404 for me, >> http://docs.classic.codeclimate.com/article/213-github-pull-request-integration >> seems to work. > > Awesome, I think it's yours or Ohad's call then as nobody else has > permission to change settings on core. It took me like 10m to do it on > the repos I mentioned before :)


Dominic Cleal
dominic@cleal.org

Activated on theforeman/foreman, please reply if you see any issues.

··· On 03/06/16 11:41, Dominic Cleal wrote: > On 03/06/16 11:40, Daniel Lobato Garcia wrote: >> On 06/02, Dominic Cleal wrote: >>> On 02/06/16 15:54, Daniel Lobato Garcia wrote: >>>> Hi devs, >>>> >>>> We activated CodeClimate analysis on our project some time ago - >>>> https://codeclimate.com/github/theforeman/foreman >>>> >>>> It's an useful tool to see how coupled, well coded, etc.. your >>>> application is. A while ago it used to be 2.9 IIRC, and it's became >>>> worse over time. >>>> >>>> I found it useful to run it on certain PRs manually to detect areas that >>>> can be improved, but it's a bit of a PITA to do it manually. They have a >>>> free open source plan and it can show this information directly on the >>>> PR. >>>> >>>> I think it would make sense for Foreman core and other Ruby projects >>>> to use this tool to see how our code quality* improves/gets worse on >>>> each PR. Integrating it is easy and I did it with foreman_cockpit and >>>> foreman_ansible already. I don't have the rights to do it on Foreman >>>> core but even if I did I want others' opinions on it. >>> >>> I'm in favour of adding it, it seems useful. It is reflecting the >>> rubocop/brakeman checks we already have, but of course many are actually >>> disabled or not being checked because we've not enabled them. This gives >>> us a way of ensuring the overall style gets better (according to these >>> metrics) gradually with new code, which is nice. Hopefully this means >>> some cops can later be enabled with less work. >>> >>>> http://docs.codeclimate.com/article/213-github-pull-request-integration >>> >>> This URL is a 404 for me, >>> http://docs.classic.codeclimate.com/article/213-github-pull-request-integration >>> seems to work. >> >> Awesome, I think it's yours or Ohad's call then as nobody else has >> permission to change settings on core. It took me like 10m to do it on >> the repos I mentioned before :) > > Sure, I can do it next week if there's no other feedback.


Dominic Cleal
dominic@cleal.org