Quality Glossary

Continuous Integration (CI)
Default Branch
Organizations versus Users
Remediation
SHA
SSH Key
URI
Teams versus Owners

Continuous Integration (CI)

Continuous Integration (CI) is the process of integrating new code into your project early and often.

As team members complete their work, they integrate it back into the overall project. Each time they do, an automated process is triggered that quickly determines if the new code has introduced any problems (i.e., did it break the build?). If problems are found, most CI tools will show a “red” light, indicating a problem must be resolved. If no problems are found, a “green” light will indicate the code is safe to ship.

There are a number of great hosted CI services. Some of our favorites (which we've integrated with!) are Semaphore, Solano Labs, and Travis CI. Jenkins is also a popular open source CI tool.

📘

Code Climate works great alongside all testing environments, including CIs. You can configure your build server to send Code Climate a report indicating how exhaustively each line of your codebase was tested. We’ll display your test coverage alongside our code quality analysis, providing you a view of your codebase across multiple dimensions. Code that is both poorly graded and poorly tested may be a red flag.

Default Branch

Since Git repositories can contain multiple branches, Code Climate needs to know which branch to focus on. We refer to this branch as the default.

When you view your repository (e.g., when you’re checking out your Feed page), virtually all the data shown is specific to the default branch (this is true for all pages, except the Branches page).

Setting your Default Branch

A default branch is defined when adding your repository to Code Climate:

You can also set your default branch after you setup your repository

📘

By adding the same repository to Code Climate multiple times, you can set a default branch for each instance. This may be helpful, for example, if you want two separate Feeds for the same repository (each focused on a different branch).

Before going down this path, however, be sure you understand a repository's Branches page. That page may already solve your use case.

Within each repository file, letter grades are calculated by summing up all of the code's issues and then applying this value to an absolute scale. Each issue has a “remediation cost,” which allows us to sum together the cost of different issue types (e.g., duplication, complexity).

Organizations versus Users

If you will be performing administrative tasks in Code Climate, it’s helpful to understand the difference between organizations and users.

Organizations

  • Organizations (not users) are what we associate with plans and billing information.
  • Organizations can have between one and many users.
  • Organizations (not users) are who own repositories. This ensures Code Climate’s access to a repository won’t be affected if a user leaves an organization.

📘

If you added a repository to Code Climate by clicking Add Open Source Repo, the repository will not be owned by an organization or user (though it can still be administered).

Users

  • Users are humans (hey, that’s you!).
  • Users can be members of one or many organizations.
  • Users should map to a single person, not be shared amongst different people.
  • A Code Climate user can be linked to a GitHub user account (highly recommended).

Remediation

When penalizing grades for violations, Code Climate uses the concept of remediation, or the amount of effort required to improve a software issue. Remediation points assigned to a violation are a numerical representation of the amount of work needed to repair the issue.

Remediation PointsFile Rating
0 - 2MA
> 2M - 4MB
> 4M - 8MC
> 8M - 16MD
> 16MF

SHA

Git assigns each commit a unique identifier, which is comprised of a 40 character string. Here’s an example: 226ba6afcc4b4c507878ac914f7a7020a6174f3e.

People commonly refer to this string as a SHA, because it is calculated by taking a SHA-1 hash of the contents of a commit (plus some header information). It is virtually impossible for two SHAs to be identical. If you view a commit in GitHub, or run git log, you can see a commit’s SHA.

In Code Climate, the SHA associated with our most recent analysis is displayed on the Feed page. This allows you to easily determine the last time we analyzed your codebase.

109

📘

The SHA value shown on your Feed page in Code Climate is only a portion of the entire 40 character SHA string.

SSH Key

An SSH key allows for secure data communication. Within the context of Code Climate, an SSH key grants us access to git clone and git pull your repository to our secure server to analyze your codebase.

🚧

For many hosted Git services, like GitHub, Bitbucket, and GitLab, you'll specifically be dealing with deploy keys. A deploy key is an SSH key that is attached directly to the repository instead of to a personal user account.

Many of our users don’t need to deal with SSH keys when adding their repository to Code Climate. If you've added your private GitHub repository via our streamlined method, we'll automatically install the SSH key for you.

Tip: In GitHub, you can see the Code Climate SSH key by accessing the repository’s Settings menu and selecting the Deploy keys tab.

If you've imported your repository via a URI, you'll need to manually install the SSH key. Step by step instructions can be found here.

Within Code Climate, you can view the SSH key that we associate with your repository inside its Settings menu. Note that if you've added your repository to Code Climate by selecting Add Open Source Repo, SSH keys are not used (and therefore will not be displayed in your Settings menu).

URI

A uniform resource identifier (or URI) is a unique string that identifies a resource, like a website or server. Within the context of Code Climate, a URI points us to a specific Git repository.

If you're adding a private GitHub repository to Code Climate, and your user is GitHub-linked, we’ll automatically figure out your repository’s URI during the repository setup process.

Alternatively, if you’re adding a non-Github repository, or are otherwise being prompted for a URI by Code Climate, you'll need to manually enter it. Below are some examples:

TypeExample URI
DIY Git Servergit@<Fully Qualified Domain Name>/<Repo Path>/<Repo Name>.git
GitHub[email protected]:<Username>/<Repository Name>.git
Bitbucket[email protected]:<Username>/<Repository Name>.git
GitLab[email protected]:<Username>/<Repository Name>.git

Teams versus Owners

Teams

A team is a group of users within an organization who share certain permissions. For example, you could create one team for your "platform" developers and another team for your "product" developers. From there, you could configure repository permissions for each team accordingly.