When there is trailing tab in a Python file semgrep fails.
Failing: https://sgrep.live/5J3
Trailing tab removed: https://sgrep.live/JjQ
Expected behavior
Expected semgrep to succeed, or error and clearly told me the Python syntax was invalid.
@jajajasalu2 I think your PR in returntocorp/pfff#102 likely fixes this. 馃帀
@DrewDennison unfortunately no, that PR is in but https://semgrep.live/5J3?version=develop still fails to parse
FWIW, when I run semgrep manually on this file from the command line, everything is happy. @DrewDennison is it possible this is an issue with semgrep.live?
I used semgrep-core as of 5df168ab0550c
Are you sure? Running on https://github.com/returntocorp/semgrep/pull/843/commits/119d3ce4d22979bdbf823affea87d14bd592691c which should be the same as 5df168ab0550c still gets the parse error
Hi,
Just my two cents on this: https://github.com/returntocorp/pfff/pull/102 does fix an underlying lexing issue but not this bug. The last few tokens for the erroneous code are
INDENT
NEWLINE
DEDENT
NEWLINE
EOF
For which I don't see a corresponding production in the python parser. Python 3.7 doesn't give me a syntax error either, so I guess this should parse.
Most helpful comment
@jajajasalu2 I think your PR in returntocorp/pfff#102 likely fixes this. 馃帀