URL Reference Style Rule

Description

This rule enforces consistent usage patterns when referring to URLs in text. It specifically focuses on common preposition mistakes and article usage with "URL". Clear and consistent URL references enhance readability and maintain professional writing standards. The rule is particularly important because improper preposition use with URLs can sound awkward or non-idiomatic to native English speakers.

Examples

The rule catches and corrects these patterns:

  • ❌ "Click the link to see the URL for the website" → ✅ "Click the link to see the URL of the website"
  • ❌ "You need an URL to access the site" → ✅ "You need a URL to access the site"

Key corrections:

  1. Changes "URL for" to "URL of" (proper preposition usage)
  2. Changes "an URL" to "a URL" (proper article usage since URL is pronounced starting with a consonant sound "you")

Rule Source

This rule comes from: https://github.com/mesosphere/dcos-docs-site

Rule Definition

extends: substitution
message: "Use '%s' instead of '%s'."
ignorecase: true
level: error
action:
  name: replace
swap:
  URL for: URL of
  an URL: a URL