Query module DuplicateCharacterInCharacterClass

name
Duplicate character in character class
description
If a character class in a regular expression contains the same character twice, this may indicate a bug.
kind
problem
problem.severity
warning
id
js/regex/duplicate-in-character-class
tags
reliability correctness regular-expressions
precision
very-high

Imports

javascript

Provides classes for working with JavaScript programs, as well as JSON, YAML and HTML.

Predicates

constantInCharacterClass

Holds if cc is the ith constant inside character class recc that matches the character val. Indexing is 1-based.