diff --git a/.vale.ini b/.vale.ini index 38b57a4..c15eeb6 100644 --- a/.vale.ini +++ b/.vale.ini @@ -32,4 +32,5 @@ Datadog.tense = YES Datadog.words_case_sensitive = YES Datadog.words_case_insensitive = YES Datadog.quotes = YES -Datadog.aws = YES \ No newline at end of file +Datadog.aws = YES +Datadog.lists = YES \ No newline at end of file diff --git a/styles/Datadog/app_links.yml b/styles/Datadog/app_links.yml new file mode 100644 index 0000000..17a7c45 --- /dev/null +++ b/styles/Datadog/app_links.yml @@ -0,0 +1,14 @@ +# This file is used to lint links to internal Datadog environments that are not accessible to customers. +extends: substitution +message: "This looks like a private app link. Use '%s' instead of '%s'." +link: "https://github.com/DataDog/documentation/blob/master/CONTRIBUTING.md#links" +ignorecase: true +level: error +scope: raw +action: + name: replace +swap: + # Matches known internal subdomain patterns on the product domain + 'https?://(?:dd[a-zA-Z0-9\-]*|demo)\.datadoghq\.com': https://app.datadoghq.com + # Matches the internal zero-substitution domain variant + 'https?://(?:[a-zA-Z0-9][a-zA-Z0-9\-]*\.)?datad0g\.com': https://app.datadoghq.com diff --git a/styles/Datadog/lists.yml b/styles/Datadog/lists.yml new file mode 100644 index 0000000..26debd3 --- /dev/null +++ b/styles/Datadog/lists.yml @@ -0,0 +1,14 @@ +# This file is used to lint lists. +extends: existence +message: "For ordered lists at all levels, use numbers (1.) instead of letters (a.)." +scope: raw +nonword: true +level: warning +action: + name: edit + params: + - regex + - '(\n+\s*)[a-z]\. ' # pattern + - '$11. ' # replace +tokens: + - '(?<=\n\s*)([a-z]\.) ' \ No newline at end of file