diff options
author | Lorenzo Salvadore <salvadore@FreeBSD.org> | 2023-04-14 08:14:43 +0000 |
---|---|---|
committer | Lorenzo Salvadore <salvadore@FreeBSD.org> | 2023-04-25 10:43:21 +0000 |
commit | 33856d1e846bd2d63c6bc76526a68f94ed5feaa1 (patch) | |
tree | 2caa2bcedc750ef2ad2cfee0fef195589df3da1e /.vale | |
parent | 4971f6343dece816408558d702d78732cfffe652 (diff) | |
download | doc-33856d1e846bd2d63c6bc76526a68f94ed5feaa1.tar.gz doc-33856d1e846bd2d63c6bc76526a68f94ed5feaa1.zip |
Vale: Add rule to avoid superfluous optional argument in link
Suggest to empty square brackets in `link:` macros when the displayed
text coincides with the URL.
Reviewed by: bofh, grahamperrin
Approved by: carlavilla (mentor)
Differential Revision: https://reviews.freebsd.org/D39569
Diffstat (limited to '.vale')
-rw-r--r-- | .vale/styles/FreeBSD/SuperfluousOptArgInLinks.yml | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/.vale/styles/FreeBSD/SuperfluousOptArgInLinks.yml b/.vale/styles/FreeBSD/SuperfluousOptArgInLinks.yml new file mode 100644 index 0000000000..36b2b4158b --- /dev/null +++ b/.vale/styles/FreeBSD/SuperfluousOptArgInLinks.yml @@ -0,0 +1,7 @@ +extends: existence +message: "Displayed text coincides with URL, leave the brackets empty: %s" +ignorecase: true +level: suggestion +scope: raw +raw: + - 'link:([^ ]*)\/?\[\1\/?\]' |