Skip to content

Error message for syntax errors reports a misleading line #677

Open
@CloutKhan

Description

@CloutKhan

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working👀.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions