2020-12-15 22:09:46 -05:00
|
|
|
---
|
|
|
|
# Error: gitlab.AlertBoxStyle
|
|
|
|
#
|
2021-01-05 19:10:23 -05:00
|
|
|
# Makes sure alert boxes are used with block quotes. Checks for 3 formatting issues:
|
2020-12-15 22:09:46 -05:00
|
|
|
#
|
|
|
|
# - Alert boxes inside a block quote (">")
|
|
|
|
# - Alert boxes with the note text on the same line
|
|
|
|
# - Alert boxes using words other than "NOTE" or "WARNING"
|
|
|
|
#
|
|
|
|
# For a list of all options, see https://errata-ai.gitbook.io/vale/getting-started/styles
|
|
|
|
extends: existence
|
|
|
|
message: 'Alert box "%s" must use the formatting in the style guide.'
|
|
|
|
link: https://docs.gitlab.com/ee/development/documentation/styleguide.html#alert-boxes
|
|
|
|
level: error
|
|
|
|
nonword: true
|
|
|
|
scope: raw
|
|
|
|
raw:
|
|
|
|
- '(\n *\> *(?:NOTE|WARNING)|'
|
2020-12-22 16:10:06 -05:00
|
|
|
- '\n\n(NOTE|WARNING):[^\n]|'
|
|
|
|
- '\n\n *(?:> )?\**(Note|note|TIP|Tip|tip|CAUTION|Caution|caution|DANGER|Danger|danger|Warning|warning):.*)'
|