feat: implement lint --fix and standardize README
Add FixFile() to rewrite README entries: capitalize descriptions, add trailing periods, remove author attributions, and sort entries alphabetically within each section. Update parser regex to handle entries with markers between URL and description separator. Fix linter to check first letter (not first character) for capitalization. ~480 entries standardized across the README. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -91,7 +91,11 @@ func lintCmd() *cobra.Command {
|
||||
if !fix {
|
||||
return fmt.Errorf("lint failed with %d errors", result.Errors)
|
||||
}
|
||||
fmt.Println("Auto-fix mode: --fix is not yet fully implemented for file rewriting")
|
||||
count, err := linter.FixFile(readmePath)
|
||||
if err != nil {
|
||||
return fmt.Errorf("fix: %w", err)
|
||||
}
|
||||
fmt.Printf("Fixed %d lines in %s\n", count, readmePath)
|
||||
} else {
|
||||
fmt.Printf("OK: %d warnings\n", result.Warnings)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user