Versions in this module Expand all Collapse all v0 v0.1.0 Feb 1, 2026 Changes in this version + const IssueHardcodedClass + const IssueInvalidClass + const IssueUnusedConstant + const SeverityError + const SeverityInfo + const SeverityWarning + func AnalyzeClasses(classes []*CSSClass) error + func GetRelativePath(absPath string) string + func ParseGeneratedFile(path string) (map[string]string, map[string]bool, error) + func PrintLintReport(result *LintResult, w io.Writer, verbose bool) + func ScanFiles(scanPatterns []string, verbose bool) ([]ClassReference, ScanStats, error) + func WriteGoFile(publicClasses []*CSSClass, allClasses []*CSSClass, config Config, ...) error + func WriteGoFiles(publicClasses []*CSSClass, allClasses []*CSSClass, config Config, ...) error + func WriteJSON(w io.Writer, result *LintResult) error + func WriteMarkdown(w io.Writer, result *LintResult) error + func WriteOutput(w io.Writer, result *LintResult, format OutputFormat, config LintConfig) + type CSSClass struct + GoName string + Intent string + IsInternal bool + IsUtility bool + Layer string + Name string + ParentClass *CSSClass + Properties map[string]string + PropertyDiff *PropertyDiff + PseudoStateProperties []PseudoStateProperties + PseudoStates []string + SourceFile string + func ParseCSS(content string, filename string, inferredLayer string, config Config) ([]*CSSClass, error) + type CSSLookup struct + AllCSSClasses map[string]bool + AllConstants map[string]string + ConstantParts map[string][]string + ExactMap map[string]string + type CategorizedProperty struct + Category PropertyCategory + IsToken bool + Name string + Value string + type ClassAnalysis struct + ClassName string + Context string + Match MatchType + Suggestion string + type ClassReference struct + ClassName string + ConstName string + FullClassValue string + IsConstant bool + LineContent string + Location FileLocation + type ClassificationResult int + const ClassBypassed + const ClassMatched + const ClassZombie + type Config struct + ExtractIntent bool + Format string + Includes []string + LayerInferFromPath bool + OutputDir string + PackageName string + PropertyLimit int + ShowInternal bool + SourceDir string + Verbose bool + type ConstantSuggestion struct + Analysis []ClassAnalysis + Constants []string + HasInvalid bool + HasUnmatched bool + InvalidClasses []string + UnmatchedClasses []string + func ResolveBestConstants(classString string, lookup *CSSLookup) ConstantSuggestion + type FileLocation struct + Column int + File string + Line int + Text string + type GenerateResult struct + ClassesGenerated int + Errors []error + FilesScanned int + IntentsExtracted int + Warnings []string + func Generate(config Config) (*GenerateResult, error) + type HardcodedString struct + FullClassValue string + LineContent string + Location FileLocation + Suggestion ConstantSuggestion + type InvalidClass struct + ClassName string + LineContent string + Location FileLocation + type Issue struct + FromLinter string + LineRange *LineRange + Pos IssuePos + Replacement *Replacement + Severity string + SourceLines []string + Text string + type IssuePos struct + Column int + Filename string + Line int + type JSONIssue struct + Column int + File string + Line int + Linter string + Message string + Severity string + Source string + type JSONOutput struct + Issues []JSONIssue + QuickWins JSONQuickWins + Stats JSONStats + Summary JSONSummary + Timestamp string + Version string + type JSONQuickWin struct + Class string + Occurrences int + Suggestion string + type JSONQuickWins struct + MultiClass []JSONQuickWin + SingleClass []JSONQuickWin + type JSONStats struct + ActuallyUsed int + CompletelyUnused int + ConstantReferences int + HardcodedClasses int + MigrationOpportunities int + TotalConstants int + UsagePercentage float64 + type JSONSummary struct + Errors int + FilesScanned int + TotalIssues int + Warnings int + type Layer struct + Classes []*CSSClass + Name string + Order int + type LineRange struct + From int + To int + type LintConfig struct + GeneratedFile string + MaxIssuesPerLinter int + MaxSameIssues int + PackageName string + PrintIssuedLines bool + PrintLinterName bool + ScanPaths []string + ShowStats bool + Strict bool + Threshold float64 + UseColors bool + Verbose bool + type LintResult struct + ActuallyUsed int + AvailableForMigration int + ClassesFound int + CompletelyUnused int + ConstantsFound int + ErrorCount int + FilesScanned int + HardcodedStrings []HardcodedString + InvalidClasses []InvalidClass + Issues []Issue + IssuesByCategory map[string][]Issue + QuickWins QuickWinsSummary + Suggestions []string + TotalConstants int + TruncatedCount int + UnusedClasses []UnusedClass + UsagePercentage float64 + Warnings []string + func Lint(config LintConfig) (*LintResult, error) + type MatchType int + const MatchExact + const MatchNone + type OutputFormat string + const OutputFull + const OutputIssues + const OutputJSON + const OutputMarkdown + const OutputSummary + func DetermineDefaultOutputFormat() OutputFormat + func DetermineOutputFormat(formatFlag string, quiet bool) OutputFormat + type PropertyCategory string + const CategoryEffects + const CategoryInternal + const CategoryLayout + const CategoryTokens + const CategoryTypography + const CategoryVisual + type PropertyDiff struct + Added map[string]string + Changed map[string]string + Unchanged []string + func DiffProperties(modifier, base *CSSClass) *PropertyDiff + type PseudoStateProperties struct + Changes map[string]string + PseudoState string + type QuickWin struct + ClassName string + Occurrences int + Suggestion string + type QuickWinsSummary struct + MultiClass []QuickWin + SingleClass []QuickWin + type Replacement struct + InlineLength int + NewText string + type Reporter struct + func NewReporter(w io.Writer, config LintConfig) *Reporter + func (r *Reporter) PrintIssues(issues []Issue) + func (r *Reporter) PrintSummary(result LintResult) + func (r *Reporter) UseColors() bool + type ScanStats struct + FilesDiscovered int + FilesScanned int + FilesSkipped int + type UnusedClass struct + CSSClass string + ConstName string + DefinedIn string + Layer string + type VerboseReporter struct + func NewVerboseReporter(w io.Writer, useColors bool) *VerboseReporter + func (r *VerboseReporter) PrintAdoptionProgress(result LintResult) + func (r *VerboseReporter) PrintQuickWins(result LintResult) + func (r *VerboseReporter) PrintStatistics(result LintResult) + func (r *VerboseReporter) PrintWarnings(result LintResult)