Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add more precise end coordinates #92

Open
name-snrl opened this issue Jun 3, 2023 · 4 comments
Open

feat: add more precise end coordinates #92

name-snrl opened this issue Jun 3, 2023 · 4 comments
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest Issue that is created for the Hacktoberfest event

Comments

@name-snrl
Copy link

Part

Library (crate)

Description

Hi, again. I'm using ltrs via null-ls as diagnostic tool. If the diagnostic starts on one line and ends on another, then the end of the diagnostic is out of range.

At the moment I've solved the problem with these lines in my null-ls fork, but I think it would be nice to have a more informative ltrs check output.

Screenshots

No response

Additional information

No response

@name-snrl name-snrl added the enhancement New feature or request label Jun 3, 2023
@jeertmans
Copy link
Owner

Hello! Is it the « more context » field that is wrong? Or just null-ls that does not handle that?

do you have an example string for testing?

@name-snrl
Copy link
Author

Is it the « more context » field that is wrong?

Not wrong, but not complete. It contains only line_number, but there should be an end_line.

example:

ltrs check -t 'Системы оркестрации:

- Kubernetes
- Docker swarm

Настройка CI процессов:

- GitLab CI
- Jenkins' -l auto --disabled-rules WHITESPACE_RULE

There is also an example with shellcheck for comparison:

#!/usr/bin/env bash

foo=abc
bar=xyz
declare -r str='
    foo: "'$foo'",
    blah: "blah",
    blah: "blah",
    blah: "blah",
    "bar:" "$bar",
}'

echo "$str"
echo $bar
x shellcheck -f json test.sh | jq
[
  {
    "code": 2016,
    "column": 16,
    "endColumn": 3,
    "endLine": 11,
    "file": "test.sh",
    "fix": null,
    "level": "info",
    "line": 6,
    "message": "Expressions don't expand in single quotes, use double quotes for that."
  }
]

@jeertmans
Copy link
Owner

Oh ok I get it :)

I guess I could easily add a new field to the moreContext structure. I am still wondering about the best name ^^’

@jeertmans
Copy link
Owner

Ok, so I will definitely implement this, but after looking at my code, I think MatchPositions and others related methods need some kind of rework :'-)

@jeertmans jeertmans added good first issue Good for newcomers hacktoberfest Issue that is created for the Hacktoberfest event labels Sep 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest Issue that is created for the Hacktoberfest event
Projects
None yet
Development

No branches or pull requests

2 participants