Skip to content

Add "MatchType" to improve precision of S6019 finder #221

@quentin-jaquier-sonarsource

Description

In some analyzers, it is possible to know the match type of the regex.
For example in Java:

Pattern.compile("abc").matcher(str).find(); // Partial match
Pattern.compile("abc").matcher(str).matches(); // Full match: is equivalent to "^abc$"

We can use this information to improve the precision of our rules.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions