checker

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const SystemPrompt = `` /* 2362-byte string literal not displayed */
View Source
const UserPromptTemplate = `` /* 362-byte string literal not displayed */

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckResult

type CheckResult struct {
	Issues      map[string][]providers.SemanticIssue
	Processed   int
	Passed      int
	Failed      int
	HasFailures bool
	TotalUsage  providers.Usage // Total token usage across all rules
}

func (*CheckResult) ShouldFail

func (r *CheckResult) ShouldFail(config *config.Config) bool

ShouldFail determines if the check results should cause the tool to exit with error

type GitHubReporter

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

GitHubReporter implements Reporter interface for GitHub Actions annotations

func NewGitHubReporter

func NewGitHubReporter(options *GitHubReporterOptions) *GitHubReporter

NewGitHubReporter creates a new GitHub Actions reporter

func (*GitHubReporter) Report

func (r *GitHubReporter) Report(result *CheckResult)

Report outputs GitHub Actions annotations for semantic analysis results

type GitHubReporterOptions

type GitHubReporterOptions struct {
	ShowAnalysis bool
	WorkingDir   string
}

type PromptData

type PromptData struct {
	RulePrompt   string
	SpecFiles    []string
	SpecContents []string
	ImplFiles    []string
	ImplContent  []string
}

type Reporter

type Reporter interface {
	Report(result *CheckResult)
}

Reporter defines the interface for reporting semantic analysis results

type RuleComparisonFiles

type RuleComparisonFiles struct {
	SpecFiles []string
	ImplFiles []string
}

type SemanticChecker

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

func NewSemanticChecker

func NewSemanticChecker(cfg *config.Config, client providers.Client[providers.IssueResponse], workingDir string) *SemanticChecker

func (*SemanticChecker) CheckFiles

func (c *SemanticChecker) CheckFiles(ctx context.Context, matches []processor.MatcherResult, matcher *processor.Matcher) (*CheckResult, error)

type StdoutReporter

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

StdoutReporter implements Reporter interface for console output

func NewStdoutReporter

func NewStdoutReporter(options *StdoutReporterOptions) *StdoutReporter

NewStdoutReporter creates a new stdout reporter

func (*StdoutReporter) Report

func (r *StdoutReporter) Report(result *CheckResult)

Report formats and displays the semantic analysis results to stdout

type StdoutReporterOptions

type StdoutReporterOptions struct {
	ShowAnalysis bool
	TextWidth    int
}

Jump to

Keyboard shortcuts

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