Documentation
¶
Index ¶
Constants ¶
View Source
const ( IssueUnexpected = iota IssueNotRaised )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AutofixBackup ¶
type AutofixBackup struct {
CopiedFiles []string
TmpDir string
AutofixDir string
InPlace bool
// contains filtered or unexported fields
}
func NewAutofixBackup ¶
func NewAutofixBackup( config *Config, includedFiles map[string]bool, autofixDir string, ) (*AutofixBackup, error)
NewAutofixBackup backs up the files provided in the FilesGlob pattern to before performing Autofix testing. The backup respects the root `.gitignore`.
func (*AutofixBackup) RestoreAndDestroy ¶
func (a *AutofixBackup) RestoreAndDestroy() (err error)
RestoreAndDestroy restores the Autofix backup and then deletes the backup directory. It should only be called once per backup.
type Config ¶
type Config struct {
FilesGlob string `toml:"files"`
CommentPrefix []string `toml:"comment_prefix"`
CodePath string `toml:"code_path"`
Checks TestRunnerConfig `toml:"checks"`
Autofix TestRunnerConfig `toml:"autofix"`
Processor ProcessorConfig `toml:"processor"`
TestChecks bool `toml:"test_checks"`
TestAutofix bool `toml:"test_autofix"`
}
func ReadConfig ¶
type DefaultIssuePrinter ¶
type DefaultIssuePrinter struct{}
func (DefaultIssuePrinter) PrintHeader ¶
func (DefaultIssuePrinter) PrintHeader(header string)
func (DefaultIssuePrinter) PrintIssue ¶
func (DefaultIssuePrinter) PrintIssue(file string, line, column, failureType int, issue *Issue)
func (DefaultIssuePrinter) PrintStatus ¶
func (DefaultIssuePrinter) PrintStatus(_ bool)
func (DefaultIssuePrinter) PrintUnifiedDiff ¶
func (DefaultIssuePrinter) PrintUnifiedDiff(file string, diff gotextdiff.Unified)
type Issue ¶
type Issue struct {
Code string `json:"code"`
Title string `json:"title"`
Position IssuePosition `json:"position"`
}
type IssuePosition ¶
type IssuePrinter ¶
type PrettyIssuePrinter ¶
type PrettyIssuePrinter struct {
// contains filtered or unexported fields
}
func NewPrettyIssuePrinter ¶
func NewPrettyIssuePrinter() *PrettyIssuePrinter
func (*PrettyIssuePrinter) PrintHeader ¶
func (*PrettyIssuePrinter) PrintHeader(header string)
func (*PrettyIssuePrinter) PrintIssue ¶
func (p *PrettyIssuePrinter) PrintIssue( file string, line, column, failureType int, issue *Issue, )
func (*PrettyIssuePrinter) PrintStatus ¶
func (*PrettyIssuePrinter) PrintStatus(passed bool)
func (*PrettyIssuePrinter) PrintUnifiedDiff ¶
func (p *PrettyIssuePrinter) PrintUnifiedDiff(file string, diff gotextdiff.Unified)
type ProcessorConfig ¶
Click to show internal directories.
Click to hide internal directories.