Skip to content

Concatenated single quoted strings interacts with Rider's built-in regex validation #303

@binarycow

Description

@binarycow

When a concatenated single quoted string is used in a pattern, Rider's built-in regex validation raises an inspection - it considers the whitespace between the strings to be part of the pattern.

From ietf-yang-types.yang:

typedef object-identifier {
    type string {
      pattern '(([0-1](\.[1-3]?[0-9]))|(2\.(0|([1-9]\d*))))'
            + '(\.(0|([1-9]\d*)))*';
    }
}

The inspection being raised is the RegExp inspection named "Consecutive spaces" (documentation link)

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions