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

fix: correct line number processing #113

Closed
wants to merge 1 commit into from

Conversation

ssbarnea
Copy link
Member

Fixes bug which prevented logging of errors on line 0.

Fixes bug which prevented logging of errors on line 0.
@ssbarnea ssbarnea requested a review from JPinkney as a code owner May 19, 2021 07:27
@ssbarnea ssbarnea added the bug Something isn't working label May 19, 2021
if (matches) {
let message = matches.groups?.message ?? "unknown";
let line = parseInt(matches.groups?.line ?? "1") - 1;
let line = parseInt(matches.groups?.line ?? "0");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have a test for this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact I have no tests and this will soon come to hunt me. If one of you could add even a sample test I could start adding tests. The reason for not adding tests is because I not dot know how to write them for extensions.

Anyway, this morning I proved that there is no bug in the extension and was caused by ansible/ansible-lint#1556 -- the linter will be released soon.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC the last time I had to setup tests I followed https://code.visualstudio.com/api/working-with-extensions/testing-extension

@ssbarnea ssbarnea closed this May 19, 2021
@ssbarnea ssbarnea deleted the fix/line-number branch April 4, 2022 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants