From bcf8a34ffdeafd5b71163df1aa6791cc9eeedc5c Mon Sep 17 00:00:00 2001 From: Frank Harkins Date: Fri, 17 Mar 2023 12:38:08 +0000 Subject: [PATCH] Add Links rule Signed-off-by: Frank Harkins --- IBMQuantum/Links.yml | 16 ++++++++++++++++ features/rules.feature | 1 + fixtures/Terms/.vale.ini | 1 + fixtures/Terms/test.md | 4 ++++ 4 files changed, 22 insertions(+) create mode 100644 IBMQuantum/Links.yml diff --git a/IBMQuantum/Links.yml b/IBMQuantum/Links.yml new file mode 100644 index 0000000..963e595 --- /dev/null +++ b/IBMQuantum/Links.yml @@ -0,0 +1,16 @@ +extends: existence +message: Link names should make sense without context; change "%s" to something more descriptive. +level: suggestion +code: false +scope: link +ignorecase: true +tokens: + - click here + - here + - link + - more + - more information + - page + - read more + - this link + - this page diff --git a/features/rules.feature b/features/rules.feature index 2124038..b9517c9 100644 --- a/features/rules.feature +++ b/features/rules.feature @@ -12,6 +12,7 @@ Feature: Rules test.md:19:29:IBMQuantum.However:Double-check your punctuation around 'however' (see github.com/IBM/ibm-quantum-style-guide/issues/10 for more information). test.md:23:16:IBMQuantum.However:Double-check your punctuation around 'however' (see github.com/IBM/ibm-quantum-style-guide/issues/10 for more information). test.md:25:1:IBMQuantum.Politeness:Don't use 'Please' + test.md:27:12:IBMQuantum.Links:Link names should make sense without context; change "link" to something more descriptive. """ Scenario: Use of punctuation diff --git a/fixtures/Terms/.vale.ini b/fixtures/Terms/.vale.ini index d3a0a7a..fb45ba5 100644 --- a/fixtures/Terms/.vale.ini +++ b/fixtures/Terms/.vale.ini @@ -7,3 +7,4 @@ IBMQuantum.Spelling = YES IBMQuantum.Terms = YES IBMQuantum.Politeness = YES IBMQuantum.However = YES +IBMQuantum.Links = YES diff --git a/fixtures/Terms/test.md b/fixtures/Terms/test.md index d688137..a6be87f 100644 --- a/fixtures/Terms/test.md +++ b/fixtures/Terms/test.md @@ -23,3 +23,7 @@ Our rules should not, however, match this sentence. This sentence is however, bad. Please do not be too polite in your technical writing. + +This is a [link](www.ibm.com) to IBM's site. + +Check out this link to the [IBM website](www.ibm.com).