Inspectopedia
 
2024.3

Duplicate branch in alternation

Warning
New
Last modified: 03 December 2024

Reports duplicate branches in a RegExp alternation. Duplicate branches slow down matching and obscure the intent of the expression.

Example:

After the quick-fix is applied:

New in 2017.1