Conan: Integrate Continuous Code Quality with Conan

Created on 16 Sep 2018  路  8Comments  路  Source: conan-io/conan

Hi!

It would be nice to integrate a linter/analyser service on Conan.

There are many cloud services as, codeclimate, codeship, sonarqube, sonarcloud, codescan, codacy, ...

But only two (AFAIK) are free for open source projects:

The good thing is get grade on every new PR and show that grade on readme file.

I have used Codacy on Bincrafters Remove Outdated

Also, Sonacloud runs SonarQube as a service.

  • [X] I've read the CONTRIBUTING guide.
  • [X] I've specified the Conan version, operating system version and any tool that can be relevant.
  • [X] I've explained the steps to reproduce the error or the motivation/use case of the question/suggestion.
low medium queue feature look into

Most helpful comment

We agree on introduce pep8 checks, but only for the added/modified files, if that is possible it could be introduced.

All 8 comments

I'm not opposed to integrate one of them and try if it really helps.

We agree on introduce pep8 checks, but only for the added/modified files, if that is possible it could be introduced.

Hi!

I've checked some tools:

Codacy

Sonar Cloud

Landscape.io

CodeScan

Hound

Code Climate

So, code climate can be triggered by a PR and update the status if failing?

Yes! And it has a badge to be used in README file :heart_eyes:

Nice! For the next release planning I would probably add this (to be done at the very beggining of the release). I think it would be a good idea to check the rules we want to exclude based on the results you got here: https://codeclimate.com/github/uilianries/conan/issues

I would prefer to exclude them using a generic pep8 directive at an ini file rather than exclude the rules in the codeclimate interface, so we can point the community the rules we matter.

Then open a big pull request fixing the pep8 detected issues in the whole repository and start failing each pull request with pep8 errors.

I unasigned the issue because it is again in the queue (and these are our rules), but probably it will be a good idea if you do that work.

Great work investigating!

Could I run yapf to format all code? It could help us to fix some errors. Of course, I'm gonna use 100 columns instead of 80.

I would prefer to exclude them using a generic pep8 directive at an ini file rather than exclude the rules in the codeclimate interface, so we can point the community the rules we matter.

Good point, I think rules from pep8 are not able to be disabled by web interface, because pep8 is a plugin on that case. Only Codeclimate engine is able to customized. Anyway, is totally possible to add a .ini file with pep8 rules.

I'm a bit afraid of automatic formatting. You could try it, pass the tests and see how it goes and show us how the diff looks anyway. But as I said, this is to be done in the next release, (but if you have this prepared for the next day we release 1.12 the better to avoid more conflicts than needed)

Was this page helpful?
0 / 5 - 0 ratings