Cette page est affichée en anglais. Une traduction française est en cours.
SkillsMay 12, 2026·2 min de lecture

reviewdog — Turn Lint Into PR Review Comments

reviewdog reads any linter output and posts precise PR comments or Checks, so teams can enforce quality without noisy, copy-pasted logs in reviews.

Prêt pour agents

Staging sûr pour cet actif

Cet actif est d'abord staged. Le prompt copié demande à l'agent d'inspecter les fichiers staged avant d'activer scripts, config MCP ou config globale.

Stage only · 29/100Policy : staging
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Stage only
Confiance
Confiance : Established
Point d'entrée
Asset
Commande de staging sûr
npx -y tokrepo@latest install e9ba168c-1bce-4dc4-be6a-a8d99a670061 --target codex

Stage les fichiers d'abord; l'activation exige la revue du README et du plan staged.

Introduction

reviewdog reads any linter output and posts precise PR comments or Checks, so teams can enforce quality without noisy, copy-pasted logs in reviews.

  • Best for: repos that have multiple linters and want consistent, diff-scoped PR feedback
  • Works with: GitHub/GitLab CI, any linter output (checkstyle/eslint/golangci-lint, etc.)
  • Setup time: 10–20 minutes

Practical Notes

  • Quant gate: make CI fail when new issues appear (diff-only mode).
  • Tip: start with -reporter=local before wiring PR credentials.

Pattern: “diff-only” quality gate

When a repo has a backlog of existing issues, the fastest rollout is only comment on new problems introduced by the PR.

  1. Pick one linter and ensure it prints file/line/col.

  2. Pipe to reviewdog with diff filtering:

<your_linter_cmd> | reviewdog -f=golint -reporter=github-pr-review -filter-mode=diff_context
  1. Tighten gradually:
  • Start as github-pr-review (developer-friendly),
  • then switch to github-check (status checks) if you want a strict merge gate.

Pattern: unify many linters into one “review surface”

If your CI runs multiple tools (format, security, deps, etc.), keep the PR readable:

  • Use a consistent reporter (Checks or Review),
  • use consistent severity mapping,
  • keep messages short and actionable (first sentence: what to change).

Troubleshooting

  • If nothing posts: validate you’re running in a PR context and tokens are present.
  • If comments are too noisy: use diff filtering, or limit to changed paths only.

FAQ

Q: Do I have to use GitHub Actions? A: No. reviewdog can run in many CI systems; the key is having a PR diff context when you want PR comments.

Q: Can I run it locally? A: Yes. Use -reporter=local to validate parsing and formatting before wiring CI credentials.

Q: How do I avoid commenting on old issues? A: Use diff filtering (-filter-mode=diff_context) so only new issues are surfaced.

🙏

Source et remerciements

Source: https://github.com/reviewdog/reviewdog > License: MIT > GitHub stars: 9,286 · forks: 485

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires