fixer

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateDiff

func GenerateDiff(fixes []Fix) string

GenerateDiff creates a unified diff for review

func PrintFixes

func PrintFixes(fixes []Fix, dryRun bool)

PrintFixes displays the suggestions in a readable format

Types

type Fix

type Fix struct {
	File     string
	Line     int
	Original string
	Fixed    string
	Rule     string
	Applied  bool
}

Fix represents a suggested change

type Fixer

type Fixer struct {
	DryRun  bool
	Verbose bool
}

Fixer handles fix suggestions

func NewFixer

func NewFixer(dryRun, verbose bool) *Fixer

NewFixer creates a new fixer

func (*Fixer) FixIssues

func (f *Fixer) FixIssues(issues []rules.Issue) []Fix

FixIssues generates fix suggestions for the given issues

Jump to

Keyboard shortcuts

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