feat: integrate charmbracelet/fang v2 with golangci-lint brand theme#6473
Draft
LarsArtmann wants to merge 2 commits intogolangci:mainfrom
Draft
feat: integrate charmbracelet/fang v2 with golangci-lint brand theme#6473LarsArtmann wants to merge 2 commits intogolangci:mainfrom
LarsArtmann wants to merge 2 commits intogolangci:mainfrom
Conversation
Integrate charmbracelet/fang v2 to provide styled help pages and error messages for the golangci-lint CLI. This replaces the default Cobra help and error output with colorful, well-formatted alternatives. - Replace cobra.Command.Execute() with fang.Execute() in root command - Use fang.WithoutVersion() to preserve existing version handling - Remove duplicate error printing in main.go (fang handles errors) - Existing custom help subcommands (help linters, help formatters) preserved Closes golangci#6464 💘 Generated with Crush Assisted-by: GLM-5.1 via Crush <crush@charm.land>
|
|
|
Hey, thank you for opening your first Pull Request ! |
Author
|
I can not accept the CLA at: https://cla-assistant.io/golangci/golangci-lint?pullRequest=6473
|
…rsion --no-long WithoutVersion Integrate charmbracelet/fang v2 with a custom color scheme matching the golangci-lint branding (primary blue #2563eb). Now that fang styles the CLI help and error messages, and version output, we can remove the redundant color.GreenString() wrappers from all flag descriptions since fang already provides consistent theming. - Add WithVersion() instead of WithoutVersion() for let fang handle --version natively - Add custom color theme using golangci-lint.run brand colors - Remove color.GreenString() from ~60 flag descriptions across 12 files - Remove unused color imports from 7 files 💘 Generated with Crush Assisted-by: GLM-5.1 via Crush <crush@charm.land>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Closes #6464
What
Styles the golangci-lint CLI with charmbracelet/fang v2: colorful help pages, error messages, and version output using a custom color scheme matching the golangci-lint.run website.
Changes
Core integration (
root.go,main.go,theme.go,go.mod):c.cmd.Execute()withfang.Execute()+fang.WithVersion(c.info.Version)for native version handlinggolangciColorSchemeusing brand colors (primary blue#2563eb, teal accent#0d9488)main.go(fang handles styled errors internally)Cleanup (12 files):
color.GreenString()from ~60 flag descriptions — fang now styles these viaColorScheme.FlagDescriptiongithub.com/fatih/colorimports from 7 filesPreserved behavior
versionsubcommand with--json,--debug,--shortflags unchangedhelp linters/help formatterssubcommands unchanged--colorflag still controls linter output coloring