No Periods in Acronyms

Description

This rule checks for acronyms or initialisms that use periods between letters (like "U.S.A." or "C.I.A."). The rule aims to enforce a cleaner, more modern style of writing acronyms without periods, which is recommended by many style guides including Google's developer documentation style guide. Removing periods from acronyms makes text more readable and reduces visual clutter, while also being more consistent with contemporary writing practices.

Examples

This rule will flag:

  • U.S.A.
  • C.I.A.
  • F.B.I.

These should instead be written as:

  • USA
  • CIA
  • FBI

The rule specifically looks for three or more capital letters separated by periods (\b(?:[A-Z]\.){3,}). Note that it only triggers for acronyms with three or more letters, so acronyms like "U.S." with just two letters won't be flagged.

Rule Source

This rule comes from: https://github.com/jump-dev/JuMP.jl

Rule Definition

extends: existence
message: "Don't use periods with acronyms or initialisms such as '%s'."
link: 'https://developers.google.com/style/abbreviations'
level: error
nonword: true
tokens:
  - '\b(?:[A-Z]\.){3,}'