Skip to main content Link Search Menu Expand Document (external link)

RFC-0008: codacy

Summary

Introducing static code checks and code quality checks using Codacy.

Motivation

Automated code reviews are super helpful as it removes a lot of the nit-picky discussions from code reviews as well as catches far more small mistakes.

Codacy is a great platform that is free for open source projects and is a collection of a wide range of code analysis tools.

Explanation

Our Codacy organization will be found over at https://app.codacy.com/gh/iver-wharf where all of our projects has been added.

We aim to use the same quality settings and code patterns throughout all of our repositories, so most of our linting configuration will be placed as config files inside the repositories, such as the .remarkrc files.

Quality settings

Codacy allows setting quality settings for how it declares commits to be OK or rejected. A rejected commit will block a pull request.

  • Reject commits when…

    • (keep default values)
  • Reject pull requests when…

    • (keep default values, except:)
    • Duplication is over 1 cloned block(s)
  • Repository is considered unhealthy when…

    • (keep default values)

Read more: https://docs.codacy.com/repositories-configure/quality-settings/

Integration

GitHub integration settings:

  • Status checks: ON
  • Annotations: OFF
  • Summary: ON (non-default)
  • Suggested fixes: ON (non-default)

Read more: https://docs.codacy.com/repositories-configure/integrations/github-integration/#configuring-the-github-integration

Code patterns

As for configuration, we have RemarkLint (.remarkrc) and ESLint (.eslintrc.json) config files already in the repositories. None yet for Revive, but that is left as-is to use the default settings.

Read more: https://docs.codacy.com/repositories-configure/code-patterns/#using-your-own-tool-configuration-files

Compatibility

Nothing comes to mind.

Alternative solutions

Using Codeac (https://www.codeac.io/) instead of Codacy (https://www.codacy.com/)

Here it falls in more with previous experience. I (@jilleJr) have a bias towards Codacy as I’ve used it before and find it very capable. I have not tried Codeac, although its popularity is steadily rising, but we can always transition away from Codacy over to Codeac later on if we so wish.

Future possibilities

Nothing comes to mind.

Unresolved questions

Nothing comes to mind.


Copyright © 2021 Wharf (Iver Sverige AB). Distributed by an MIT license.

Page last modified: 2021-05-24.