NAME
Claude::Agent::Code::Review::Report - Structured code review report
SYNOPSIS
my $report = Claude::Agent::Code::Review::Report->new(
summary => 'Found 5 issues',
issues => \@issues,
metrics => { files_reviewed => 10 },
);
if ($report->has_issues) {
print $report->summary, "\n";
for my $issue (@{$report->issues}) {
print $issue->description, "\n";
}
}
# Group by category or severity
my $by_cat = $report->issues_by_category;
my $by_sev = $report->issues_by_severity;
# Output formats
print $report->as_text;
print $report->as_json;
DESCRIPTION
Represents a complete code review report with issues and metrics.
ATTRIBUTES
summary - Brief overview of findings
issues - ArrayRef of Claude::Agent::Code::Review::Issue objects
metrics - HashRef of review metrics (optional)
METHODS
has_issues
Returns true if there are any issues.
has_critical_issues
Returns true if there are any critical severity issues.
has_high_issues
Returns true if there are any high severity issues.
issue_count
Returns the total number of issues.
generate_summary
Generates a clean, deterministic summary from issues. This is preferred over AI-generated summaries which can be inconsistent.
Can be called as instance method or class method:
my $summary = $report->generate_summary;
my $summary = Claude::Agent::Code::Review::Report->generate_summary(\@issues);
issues_by_category
Returns a hashref grouping issues by category.
my $by_cat = $report->issues_by_category;
# { bugs => [...], security => [...], ... }
issues_by_severity
Returns a hashref grouping issues by severity.
my $by_sev = $report->issues_by_severity;
# { critical => [...], high => [...], ... }
issues_by_file
Returns a hashref grouping issues by file.
my $by_file = $report->issues_by_file;
# { 'lib/Foo.pm' => [...], 'lib/Bar.pm' => [...] }
as_text
Returns a human-readable text representation of the report.
as_json
Returns a JSON representation of the report.
to_hash
Returns a hashref representation of the report.
AUTHOR
LNATION, <email at lnation.org>
LICENSE
This software is Copyright (c) 2026 by LNATION.
This is free software, licensed under The Artistic License 2.0 (GPL Compatible).