Skip to content

DetectIdentifiers parsing decimals with suffix are considered as Identifier #300

@tyl24

Description

@tyl24

Hello,
In the DetectIdentifiers method an expression like this one : "amount=Math.Round(455.7 * (0.2m/1000))"
considere that the decimal suffix m is an unknownIdentifier, which is wrong !
This behaviours was not the case in previous version 2.13.

In file Detector.cs, I propose to change the RegEx :IdentifiersDetectionRegex like this :
(?<id>@?(?<!\d)(?<!\dm)(?<!\df)(?<!\dd)[\p{L}\p{Nl}_][\p{L}\p{Nl}\p{Nd}\p{Mn}\p{Mc}\p{Pc}\p{Cf}_]*)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions