Documentation
¶
Overview ¶
Package formatter provides functionality for formatting lint issues in a human-readable format. It includes various formatters for different types of issues and utility functions for text manipulation.
Index ¶
Constants ¶
View Source
const ( CycloComplexity = "high-cyclomatic-complexity" SliceBound = "slice-bounds-check" MissingModPackage = "gno-mod-tidy" DeprecatedFunc = "deprecated" )
rule set
Variables ¶
This section is empty.
Functions ¶
func GenerateFormattedIssue ¶
func GenerateFormattedIssue(issues []tt.Issue, snippet *internal.SourceCode) string
GenerateFormattedIssue formats a slice of issues into a human-readable string. It uses the appropriate formatter for each issue based on its rule.
Types ¶
type CyclomaticComplexityFormatter ¶
type CyclomaticComplexityFormatter struct{}
func (*CyclomaticComplexityFormatter) IssueTemplate ¶
func (f *CyclomaticComplexityFormatter) IssueTemplate() string
type GeneralIssueFormatter ¶
type GeneralIssueFormatter struct{}
func (*GeneralIssueFormatter) IssueTemplate ¶
func (f *GeneralIssueFormatter) IssueTemplate() string
type MissingModPackageFormatter ¶
type MissingModPackageFormatter struct{}
func (*MissingModPackageFormatter) IssueTemplate ¶
func (f *MissingModPackageFormatter) IssueTemplate() string
type SliceBoundsCheckFormatter ¶
type SliceBoundsCheckFormatter struct{}
func (*SliceBoundsCheckFormatter) IssueTemplate ¶
func (f *SliceBoundsCheckFormatter) IssueTemplate() string
Click to show internal directories.
Click to hide internal directories.