This rule prevents the use of terminal punctuation (periods, question marks, and exclamation points) at the end of headings. Following Microsoft Style Guide recommendations, headings should not end with punctuation marks as they are unnecessary and can make headings look cluttered or informal.
The rule operates specifically on heading content (scope: heading
) and will trigger a warning if it finds these punctuation marks at the end of headings.
Examples:
✗ Incorrect:
- How to install Python?
- Welcome to our documentation!
- Getting Started.
✓ Correct:
- How to install Python
- Welcome to our documentation
- Getting Started
The rule uses a regular expression pattern to match any lowercase letter or number followed by a period, question mark, or exclamation point at the end of the line. When triggered, it automatically suggests removing the punctuation mark from the heading.