Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure to parse a Java multiline string ending in an escaped double quote, i.e. four consecutive double quotes #9991

Open
1 of 3 tasks
begglez opened this issue Mar 22, 2024 · 1 comment
Labels
bug Something isn't working lang:java parsing Requires a fix in a parser, typically a tree-sitter or menhir grammar.

Comments

@begglez
Copy link

begglez commented Mar 22, 2024

Describe the bug
Semgrep can't parse a Java multiline string ending in an escaped double quote.

To Reproduce
Try parsing this:
String x = """
hello world
\"""";

Not linking to the semgrep.dev playground because I didn't see a way to permalink a snippet without creating an account.

Expected behavior
Parse the string

What is the priority of the bug to you?

  • P0: blocking your adoption of Semgrep or workflow
  • P1: important to fix or quite annoying
  • P2: regular bug that should get fixed

Environment
Reproducible in semgrep.dev

Use case
Eliminate erroneous alerts from hooks on GH PRs

@ievans ievans added bug Something isn't working java Pull requests that update Java code labels Mar 25, 2024
@ievans
Copy link
Member

ievans commented Mar 25, 2024

thanks for the bug report!

ftr, you can create a permalink by clicking the "share" button without login

@ievans ievans added parsing Requires a fix in a parser, typically a tree-sitter or menhir grammar. lang:java and removed java Pull requests that update Java code labels Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lang:java parsing Requires a fix in a parser, typically a tree-sitter or menhir grammar.
Development

No branches or pull requests

2 participants