report

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Issue

type Issue struct {
	File       string `json:"file"`
	Line       int    `json:"line"`
	Column     int    `json:"column"`
	Severity   string `json:"severity"`
	Rule       string `json:"rule"`
	Message    string `json:"message"`
	Tool       string `json:"tool"`
	Suggestion string `json:"suggestion,omitempty"`
}

Issue represents a quality issue.

type Report

type Report struct {
	Timestamp    time.Time          `json:"timestamp"`
	ProjectRoot  string             `json:"project_root"`
	TotalFiles   int                `json:"total_files"`
	Duration     time.Duration      `json:"duration"`
	Summary      Summary            `json:"summary"`
	ToolResults  []ToolResult       `json:"tool_results"`
	IssuesByFile map[string][]Issue `json:"issues_by_file"`
}

Report represents a quality report.

type ReportGenerator

type ReportGenerator struct {
	// contains filtered or unexported fields
}

ReportGenerator generates quality reports.

func NewReportGenerator

func NewReportGenerator(projectRoot string) *ReportGenerator

NewReportGenerator creates a new report generator.

func (*ReportGenerator) GenerateReport

func (g *ReportGenerator) GenerateReport(results []*tools.Result, duration time.Duration, totalFiles int) *Report

GenerateReport creates a report from quality results.

func (*ReportGenerator) GetReportPath

func (g *ReportGenerator) GetReportPath(format string) string

GetReportPath generates a report file path.

func (*ReportGenerator) SaveHTML

func (g *ReportGenerator) SaveHTML(report *Report, outputPath string) error

SaveHTML saves the report as HTML.

func (*ReportGenerator) SaveJSON

func (g *ReportGenerator) SaveJSON(report *Report, outputPath string) error

SaveJSON saves the report as JSON.

func (*ReportGenerator) SaveMarkdown

func (g *ReportGenerator) SaveMarkdown(report *Report, outputPath string) error

SaveMarkdown saves the report as Markdown.

type Summary

type Summary struct {
	TotalTools      int `json:"total_tools"`
	SuccessfulTools int `json:"successful_tools"`
	FailedTools     int `json:"failed_tools"`
	TotalIssues     int `json:"total_issues"`
	ErrorIssues     int `json:"error_issues"`
	WarningIssues   int `json:"warning_issues"`
	InfoIssues      int `json:"info_issues"`
	FilesWithIssues int `json:"files_with_issues"`
}

Summary contains report summary information.

type ToolResult

type ToolResult struct {
	Tool           string        `json:"tool"`
	Language       string        `json:"language"`
	Success        bool          `json:"success"`
	Duration       time.Duration `json:"duration"`
	FilesProcessed int           `json:"files_processed"`
	IssuesFound    int           `json:"issues_found"`
	Error          string        `json:"error,omitempty"`
}

ToolResult represents the result of a single tool execution.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL