Skip to content

Extension reports errors everywhere, not just where they happen #77

Closed
@achekulaev

Description

@achekulaev

This one seems to be related to this extension rather then tree-sitter, correct me if I am wrong.

Bash IDE highlights the whole function (or even the whole file!) as erroneous, despite parsing error actually happens only in a single line of the function. Example:

ex3

And even worse when it is the whole file

ex2

So the issue here is the line [[ "$x" == *"something something"* ]]. If I remove it, the underline will be gone. It is a Tree-sitter issue and this is fine, I will report it and hope they will fix it.

What is puzzling here is why Bash IDE has highlighted the whole file in red, rendering it impossible to spot the problematic place. I would expect Bash IDE to only highlight the line, where the error has happened. Maybe also the function name.

But not all the lines in the function and definitely not all the lines in the file.

As bash developer I really want to see those highlights, because it helps to spot error early, but they need to be meaningful to be useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions