Skip to content

Commit 76351d7

Browse files
janine-cclaude
andauthored
Add app_links Vale rule to flag private internal URLs (#89)
* Add app_links Vale rule to flag private internal Datadog URLs Catches internal subdomain patterns (dd*.datadoghq.com, demo.datadoghq.com) and datad0g.com links, suggesting app.datadoghq.com as the replacement. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * Catch app.datadog.com and suggest app.datadoghq.com Co-Authored-By: Claude Sonnet 4.6 <[email protected]> --------- Co-authored-by: Claude Sonnet 4.6 <[email protected]>
1 parent d22c4af commit 76351d7

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

styles/Datadog/app_links.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# This file is used to lint links to internal Datadog environments that are not accessible to customers.
2+
extends: substitution
3+
message: "This looks like a private app link. Use '%s' instead of '%s'."
4+
link: "https://github.com/DataDog/documentation/blob/master/CONTRIBUTING.md#links"
5+
ignorecase: true
6+
level: error
7+
scope: raw
8+
action:
9+
name: replace
10+
swap:
11+
# Matches known internal subdomain patterns on the product domain
12+
'https?://(?:dd[a-zA-Z0-9\-]*|demo)\.datadoghq\.com': https://app.datadoghq.com
13+
# Matches the internal zero-substitution domain variant
14+
'https?://(?:[a-zA-Z0-9][a-zA-Z0-9\-]*\.)?datad0g\.com': https://app.datadoghq.com
15+
# Matches app.datadog.com (missing 'hq')
16+
'https?://app\.datadog\.com': https://app.datadoghq.com

0 commit comments

Comments
 (0)