reviewdog is a free, open source version control & collaboration project written in Go and released under MIT. It has 9,597 GitHub stars, 494 forks and 131 open issues, and was last pushed 21 hours ago. On this registry it ranks #12 of 30 tracked projects in Version Control & Collaboration, with 5 head-to-head comparisons available. It gained 7 stars over the last 3 tracked days.

What is reviewdog?

What it is

reviewdog is an automated code review tool written in Go and released under the MIT license. It lives in the version control and collaboration space of the developer tooling ecosystem, and it integrates with code analysis tools regardless of programming language. Rather than performing analysis itself, reviewdog consumes the output of existing linters and static analysis tools and turns those findings into review comments on code hosting services. The project has been published for roughly ten years, carries more than nine thousand stars and close to five hundred forks, and its topic list covers CI, linting, static analysis, code quality, and the GitHub, GitLab and Bitbucket platforms.

The concrete problem it solves is noise and placement. A linter run in continuous integration typically emits a long report over an entire codebase, which is difficult to act on during review. reviewdog takes that output, filters it to findings that fall inside the diff of the patch under review, and posts the surviving findings as comments anchored to the relevant lines. The same filtering works locally, so a developer can run a linter over a whole project and see only issues introduced by the current change. reviewdog also supports code suggestions, a configuration file, and exit codes that let a pipeline fail when problems remain.

Key capabilities

  • Consumes any linter output through configurable errorformat, pre-defined errorformats, Reviewdog Diagnostic Format (RDFormat), checkstyle format, SARIF format, or a supplied diff.
  • Posts findings as comments on GitHub, GitLab and Bitbucket through dedicated reporters.
  • Offers multiple GitHub reporters, including pull request checks, checks, pull request review comments, annotations, and pull request annotations.
  • Provides GitLab MergeRequest discussion and MergeRequest commit reporters, plus a Bitbucket Code Insights report reporter.
  • Runs in a local reporter mode, which is the default, to filter lint output by diff on a developer machine.
  • Attaches code suggestions to review comments.
  • Reads a reviewdog configuration file to define how tools and reporters are invoked.

Who uses it and how

  • Teams wire reviewdog into GitHub Actions, Travis CI, Circle CI, GitLab CI, or Bitbucket Pipelines to comment on merge and pull requests automatically.
  • Jenkins users run it through the common reporter path, including with the GitHub pull request builder plugin.
  • Developers run it locally to reduce a full-repository lint report to only the lines changed in the working patch.
  • Maintainers configure filter mode and exit codes so a pipeline can surface findings without necessarily failing the build.
  • Users wanting newer behaviour run the separate nightly reviewdog releases.

Getting started

The README installs reviewdog with a shell script fetched over curl, defaulting to a local ./bin/ directory, with flags for an alternative installation directory and a specific version. Alpine Linux users use wget instead, since curl is not present by default, and nightly releases are available as an alternative channel.

When to use it β€” and when not to

reviewdog fits projects that already run linters and want their findings placed inline on pull requests without writing per-tool review integrations. It is not an analyser: an operator still chooses, installs, and configures every linter, sets the matching input format, and selects a reporter for each hosting service. The install path is a shell script or a nightly build rather than a package manager, and

project readme (upstream, from github) β€” read inline

reviewdog - A code review dog who keeps your codebase healthy.

LICENSE GoDoc releases nightly releases GitHub Actions reviewdog release CircleCI Status Coverage Status GitLab Supported action-bumpr supported Contributor Covenant GitHub Releases Stats Stars

reviewdog provides a way to post review comments to code hosting services, such as GitHub, automatically by integrating with any linter tools with ease. It uses an output of lint tools and posts them as a comment if findings are in the diff of patches to review.

reviewdog also supports running in the local environment to filter the output of lint tools by diff.

design doc

Table of Contents

github-pr-check sample comment in pull-request commit status sample-comment.png reviewdog-local-demo.gif

Installation

# Install the latest version. (Install it into ./bin/ by default).
$ curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/fd59714416d6d9a1c0692d872e38e7f8448df4fc/install.sh | sh -s

# Specify installation directory ($(go env GOPATH)/bin/) and version.
$ curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/fd59714416d6d9a1c0692d872e38e7f8448df4fc/install.sh | sh -s -- -b $(go env GOPATH)/bin [vX.Y.Z]

# In alpine linux (as it does not come with curl by default)
$ wget -O - -q https://raw.githubusercontent.com/reviewdog/reviewdog/fd59714416d6d9a1c0692d872e38e7f8448df4fc/install.sh | sh -s [vX.Y.Z]

Nightly releases

You can also use nightly reviewdog release to try the latest reviewdog improvements every day!

$ curl -sfL https://raw.githubusercontent.com/reviewdog/nightly/30fccfe9f47f7e6fd8b3c38aa0da11a6c9f04de7/install.sh | sh -s -- -b $(go env GOPATH)/bin

GitHub Action: reviewdog/action-setup

steps:
- uses: reviewdog/action-setup@d8edfce3dd5e1ec6978745e801f9c50b5ef80252 # v1.4.0
  with:
    reviewdog_version: latest # Optional. [latest,nightly,v.X.Y.Z]

homebrew / linuxbrew

You can also install reviewdog using brew:

$ brew install --cask reviewdog/tap/reviewdog
$ brew upgrade --cask reviewdog/tap/reviewdog

Scoop on Windows

> scoop install reviewdog

Build with go install

$ go install github.com/reviewdog/reviewdog/cmd/reviewdog@latest

Input Format

'errorformat'

reviewdog accepts any compiler or linter result from stdin and parses it with scan-f like 'errorformat', which is the port of Vim's errorformat feature.

For example, if the result format is {file}:{line number}:{column number}: {message}, errorformat should be %f:%l:%c: %m and you can pass it as -efm arguments.

$ golint ./...
comment_iowriter.go:11:6: exported type CommentWriter should have comment or be unexported
$ golint ./.

readme truncated β€” read the full docs on github

Frequently asked questions

Is reviewdog free to use?

reviewdog is open source under the MIT licence. There is no licence fee and no seat count β€” you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does reviewdog do?

🐢 Automated code review tool integrated with any code analysis tools regardless of programming language

What is reviewdog written in?

reviewdog is primarily written in Go. Its source is publicly available at https://github.com/reviewdog/reviewdog, and it has 9,597 GitHub stars.