-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
policy status CLI: Render guidance as markdown #982
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blocking on go.mod
cleanup -- not sure what happened there exactly.
The other one on RenderWithEnvironmentConfig
is optional.
@@ -160,5 +161,10 @@ func guidanceOrEncouragement(status, guidance string) string { | |||
return "No guidance available for this rule 😞" | |||
} | |||
|
|||
return guidance | |||
renderedGuidance, err := glamour.Render(guidance, "dark") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to use RenderWithEnvironmentConfig
, which will allow users to set GLAMOUR_STYLE
environment variable to choose their styling?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking we should use a consize color scheme instead, I added a TODO with a reference to #1006
This providers a nicer view of the rule's policy status by rendering the rule as markdown. Note that this is only applicable to the CLI and would not affect our API at all. If the renderer fails, we'd just render the raw text.
This providers a nicer view of the rule's policy status by rendering
the rule as markdown. Note that this is only applicable to the CLI
and would not affect our API at all. If the renderer fails, we'd just
render the raw text.