Output formats
The review command supports three output formats: machine-readable json
, human-friendly summary
, and structured markdown
.
JSON
Default output. A simplified example structure:
[
{
"file": "src/Foo.php",
"line": 42,
"severity": "warning",
"title": "Possible null dereference",
"message": "Check variable $bar for null before use.",
"suggested_fix": "Add guard clause or null-check."
}
]
Summary
Concise human-readable summary designed for PR/MR comments. Example:
- src/Foo.php:42 (warning) Possible null dereference. Check $bar before use.
- src/Bar.php:10 (info) Consider extracting method to reduce complexity.
Markdown
Structured markdown format with emojis, metadata, and organized findings by severity and file. Perfect for detailed reports and documentation. Example:
# 🔍 Code Review Results
## 📊 Summary
- **Total Issues:** 2
- **Critical:** 0 | **High:** 0 | **Medium:** 1 | **Low:** 1
## 🔧 Findings
### src/Foo.php
#### ⚠️ Possible null dereference
- **Line:** 42
- **Severity:** warning
- **Rule:** `null-check`
**Rationale:** Variable $bar may be null at this point.
**Suggestion:** Add guard clause or null-check.
---
## 📋 Metadata
- **Generated:** 2025-01-15 12:30:00 UTC
- **Formatter:** Markdown (Custom Plugin)