Semgrep at develop, running with $ semgrep -e '$X' -l py semgrep/semgrep gives me:
an internal error occured while invoking semgrep-core:
unknown exception: Parse_info.NoTokenLocation("Match returned an empty list with no token location information; this may be fixed by adding enclosing token information (e.g. bracket or parend tokens) to the list's enclosing node type.")
Minimal Reproduction: https://semgrep.dev/s/Er9e
Even simpler is https://semgrep.dev/s/Lrxo
Looks like it's a regression between 0.27.0 and 0.28.0.
Note that there is absolutely no difference between ASTs:
0.28.0 AST:
{
"ExprStmt": [
{
"Call": [
{
"IdSpecial": [
{
"InterpolatedConcat": "FString"
},
"()"
]
},
[
{
"Arg": {
"L": {
"String": [
"x",
"()"
]
}
}
}
]
]
},
"()"
]
}
0.27.0 AST:
{
"ExprStmt": [
{
"Call": [
{
"IdSpecial": [
{
"InterpolatedConcat": "FString"
},
"()"
]
},
[
{
"Arg": {
"L": {
"String": [
"x",
"()"
]
}
}
}
]
]
},
"()"
]
}
This is blocking dog-fooding, so placing as high prio
Most helpful comment
Even simpler is https://semgrep.dev/s/Lrxo