Automated Code Review

Qlty makes it easy to implement Continuous Quality using automated code review of your pull requests. When enabled, here is how it works:

  1. A software developer writes code and opens a pull request on GitHub
  2. GitHub sends Qlty a webhook
  3. Qlty analyzes the code changes to identify newly introduced issues
  4. Qlty sends results back to GitHub as comments and/or commit statuses

Configuring automated code review

Automated code review is configured on the Project Settings > GitHub Integration page. From this page you can:

  • Enable or disable summary comments and line comments
  • Enable or disable commit statuses for analysis and code coverage
  • Enable or disable review of draft pull requests

When new Projects are added to Qlty, they inherit the Workspace’s default settings for new Projects.

Pull request comments

After analysis is finished, Qlty can comment on your pull request to let you know of the new issues that are being introduced in your code directly in your workflow.

Code comments

Just like a human reviewer, Qlty will post comments directly under the code where the issues occur. These comments include the issues’ message, the tool that it came from, and an identifier for the check.

To limit noise, Qlty will post a maximum of 50 code comments when reviewing a pull request. You can always view the full set of new issues on the Qlty website on the pull request summary page.

Summary comments

Additionally, Qlty can post a summary comment into the main pull request discussion thread. This comment includes a breakdown of the new issues found, grouped by check.

When new code is pushed to the pull request and issues are fixed, Qlty will automatically update this comment with the latest information.

Autofixes

When available, code comments include Autofixes presented as suggestions. You can commit these changes directly to your pull request to quickly fix issues.

To maximize accuracy, Autofixes are currently only available for certain checks and only for single-line changes.