redhat-developer / redhat-developer/vscode-yaml

Invalid regex using pattern for case insensitivity "(?i)"

Open
#964 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
829
Forks
260
Avg merge
5h 43m
Merged PRs (30d)
1

Description

Describe the bug

Using a pattern like "pattern": "(?i)(SecurityGroup)", wil break all validation in the same scheme,

Expected Behavior

Should work, same scheme works just fine for json documents with the build-in extension in vscode. Also validates fine with regex engines i tried.

Current Behavior

With error: Message: Request textDocument/hover failed with message: Invalid regular expression: /(?i)(Dynamic|Static)/: Invalid group

Steps to Reproduce

Use any pattern beginning with (?i) in your scheme.

Environment

  • Windows

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with a schema pattern beginning with (?i) and compare it with the working JSON-schema behavior described in the issue. Trace the YAML language server's pattern validation and hover path, then verify that case-insensitive patterns no longer produce an invalid-regular-expression error without breaking validation for the rest of the schema.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.