fixer

package
v0.21.3 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fixer

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

func NewFixer

func NewFixer() *Fixer

func (*Fixer) Fix

func (*Fixer) GetFixForName

func (f *Fixer) GetFixForName(name string) (fixes.Fix, bool)

func (*Fixer) RegisterFixes

func (f *Fixer) RegisterFixes(fixes ...fixes.Fix)

type PrettyReporter

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

PrettyReporter outputs a fix report in a human-readable format.

func NewPrettyReporter

func NewPrettyReporter(outputWriter io.Writer) *PrettyReporter

func (*PrettyReporter) Report

func (r *PrettyReporter) Report(fixReport *Report) error

type Report

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

Report contains updated file contents and summary information about the fixes that were applied during a fix operation.

func NewReport

func NewReport() *Report

func (*Report) FixedFiles

func (r *Report) FixedFiles() []string

func (*Report) FixedViolationsForFile

func (r *Report) FixedViolationsForFile(file string) []string

func (*Report) SetFileFixedViolation

func (r *Report) SetFileFixedViolation(file string, violation string)

func (*Report) TotalFixes

func (r *Report) TotalFixes() int

type Reporter

type Reporter interface {
	Report(*Report) error
}

Reporter is responsible for outputting a fix report in a specific format.

func ReporterForFormat

func ReporterForFormat(format string, outputWriter io.Writer) (Reporter, error)

ReporterForFormat returns a suitable Reporter for outputting a fix report in the given format.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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