Topics

[Edgex-tsc-core] [Edgex-golang] [discuss] Introduce Codeclimate to improve code quality

Keith Steele <keith@...>
 

Hi Trevor

Just a quick note back to say we don't necessarily have to use free stuff.
I have prepared the EdgeX board for possible purchases for the development environment... so if we feel there is something we really need but it would mean buying licenses then we can ask the board for money to do that.
It's also quite often the case that companies will give special deals to open source projects.
Let me know if it transpires we need to buy tools.

Regards
Keith

On 10 June 2018 at 20:36, <Trevor.Conn@...> wrote:

Dell Customer Communication

We might want to look at alternatives to CodeClimate given that it isn’t free. The code quality metrics and integration with GitHub are nice, remind me of SonarQube. It’s probably worth having a discussion about the topic of integrating a code quality pipeline via DevOps channels during the next Core WG meeting on Thursday. We could potentially also utilize Jenkins to trigger checks.

 

I thought this article provided a good overview of the kind of metrics a quality pipeline should capture.

https://medium.com/@jgautheron/quality-pipeline-for-go-projects-497e34d6567

 

Setting this up correctly (and monitoring it going forward) will require ownership from DevOps as well as each working group contributing to the codebase, although one working group might be able to chart a course for the others to follow.

 

Trevor

 

From: EdgeX-GoLang@lists.edgexfoundry.org [mailto:EdgeX-GoLang@lists.edgexfoundry.org] On Behalf Of vinoyang
Sent: Friday, June 8, 2018 9:03 PM
To: EdgeX-GoLang@lists.edgexfoundry.org
Subject: [Edgex-golang] [discuss] Introduce Codeclimate to improve code quality

 

Copy from Github issue #286

based on the discussion in issue #280 , I find a tool name Codeclimate which may be suitable for us.

It contains many engines(plugins), one of the plugins is golint .

I have two basic requirement :

  • a CLI : can run and do local check before making a PR and can customize with CI tool with shell, Codeclimate has a CLI
  • integrate with GitHub : yes, see details

so any idea about this tool? or is there more suitable tools can be shared?


Ian Johnson <ian.johnson@...>
 

At Canonical, we use CodeCov (which is free for open source projects + integrates with GitHub pull requests) and it works well for our large open source projects:

See for example snapd + snapcraft :

All you need to upload to codecov is a single curl command with the test results and there's various coverage parsing tools available. For go it's all built into the `go test` command when you use the -coverprofile option. For example this is all it takes for uploading to codecov from a travis build job : https://github.com/anonymouse64/asm2go/blob/master/.travis.yml#L20-L24
(I'm sure it would be simple to adapt this to a jenkins pipeline, etc.)

Ian


On Mon, Jun 11, 2018 at 8:09 AM Keith Steele <keith@...> wrote:
Hi Trevor

Just a quick note back to say we don't necessarily have to use free stuff.
I have prepared the EdgeX board for possible purchases for the development environment... so if we feel there is something we really need but it would mean buying licenses then we can ask the board for money to do that.
It's also quite often the case that companies will give special deals to open source projects.
Let me know if it transpires we need to buy tools.

Regards
Keith

On 10 June 2018 at 20:36, <Trevor.Conn@...> wrote:

Dell Customer Communication

We might want to look at alternatives to CodeClimate given that it isn’t free. The code quality metrics and integration with GitHub are nice, remind me of SonarQube. It’s probably worth having a discussion about the topic of integrating a code quality pipeline via DevOps channels during the next Core WG meeting on Thursday. We could potentially also utilize Jenkins to trigger checks.

 

I thought this article provided a good overview of the kind of metrics a quality pipeline should capture.

https://medium.com/@jgautheron/quality-pipeline-for-go-projects-497e34d6567

 

Setting this up correctly (and monitoring it going forward) will require ownership from DevOps as well as each working group contributing to the codebase, although one working group might be able to chart a course for the others to follow.

 

Trevor

 

From: EdgeX-GoLang@... [mailto:EdgeX-GoLang@...] On Behalf Of vinoyang
Sent: Friday, June 8, 2018 9:03 PM
To: EdgeX-GoLang@...
Subject: [Edgex-golang] [discuss] Introduce Codeclimate to improve code quality

 

Copy from Github issue #286

based on the discussion in issue #280 , I find a tool name Codeclimate which may be suitable for us.

It contains many engines(plugins), one of the plugins is golint .

I have two basic requirement :

  • a CLI : can run and do local check before making a PR and can customize with CI tool with shell, Codeclimate has a CLI
  • integrate with GitHub : yes, see details

so any idea about this tool? or is there more suitable tools can be shared?