Draft: Test code quality for docs diffs
What does this MR do and why?
This MR is a proof of concept that shows how we can use can output vale errors, warnings, and suggestions into a format supported by code quality. When we do this, those messages can be displayed in the diff.
To see this in action, check the diff in this MR, and scroll down to the index2.md
file, which should have icons showing the vale issues. Hover over the icons to see each vale message. The icon represents the severity (
One reason this wasn't working previously is that our vale rules use a lot of double quotes in the warning messages. The JSON also uses double quotes for strings, meaning we get lines like severity: "If possible, use "documentation" instead of "docs"."
(too many double quotes), which is invalid and fails to parse. Flipping double quotes to single quotes in the vale rules results in severity: "If possible, use 'documentation' instead of 'docs'."
, which is valid. GitLab starts parsing it, and it show up in the diff!
Related to #378718 (closed)
Screenshots or screen recordings
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.