gitstream icon indicating copy to clipboard operation
gitstream copied to clipboard

Error message for syntax errors reports a misleading line

Open CloutKhan opened this issue 8 months ago • 1 comments

Describe the bug

When a syntax error is present, and there are comments in the file, the line reported in the error message as having the syntax error requires manually counting and removing the lines that are only comment lines.

To Reproduce

Steps to reproduce the behavior:

  1. Go to https://app.gitstream.cm/playground

  2. Use any PR url, doesn't matter

  3. Add some syntax error like a: {{ ~ }} at the end of the file

  4. Error message will be like

    Error: 60: (unknown path) [Line 49, Column 7] unexpected token: ~ -

    where the Line number is what the line number would be without comment lines

Expected behavior

The error message for a syntax error is the line in the file, not the line number after comments have been processed out.

Screenshots

Image

Additional context

Add any other context about the problem here.

CloutKhan avatar Apr 02 '25 01:04 CloutKhan

Hi @CloutKhan, thanks for raising this issue! We plan to improve our playground soon and will work on this as part of the effort

PavelLinearB avatar Apr 06 '25 14:04 PavelLinearB