Improve error message with title, description, and examples #10
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.
JSON Schema allows for describing the rule with a title, description, and examples. However, currently only the automated error message is displayed.
This PR added the title to the CLI tool. This is identical to how the vs-code displays the error.
The PR also adds the hover content to the CI output. The hover content is displayed when a user hovers a property or content in an editor. This hover details includes the title, description, and examples in a formatted structure. Note, that the yaml service outputs Markdown. However, github-actions assumes ANSI outputs. Hence, a converter is used.
Colors are only displayed when the user adds:
to their
action.yaml
file. This logic is controlled by https://github.com/chalk/supports-color. Regardless, they only show up in the console, not the review comments.Example showing the new output format:
Previousely only
String does not match the pattern of "^https:\/\/youtu\.be\/[a-zA-Z0-9\-_]{11}$".
was shown.