Closed catosaurusrex2003 closed 1 month ago
The line in diagnostics being returned by the parser is not accurate when there are multi-line strings
or when the lines move back indentations.
@derberg should we include the line number in the errors ?
example: below error should be on line 12, but it is showing on line 7 cuz it ignored the multi-lined string of /info/description
I upgraded the package @asyncapi/parser
from 3.1.0
-> 3.3.0
and now the error lines are reliable and working correctly
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
/rtm
@catosaurusrex2003, i noticed something after merging this PR that the error line seem not to be acccurate for some of the errors just as seen below. It should be line 3 not line 4 🤔
Wanna fix this in a follow-up PR?
:tada: This PR is included in version 2.2.4 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
@AceTheCreator I would love to work on this. But I cant seem to reproduce this issue again.
i tried the below on https://asyncapi.github.io/asyncapi-react/ and it is giving correct line number error
could it be you are running it locally without reinstalling the nodemodules
again, cuz our @asyncapi/parser
dependency version changed in the pr.
Yea, that was the reason 😄. Everything looks good 🚀
Thanks for the fix 👍🏾
Description Diagnostics with severity 0 are displayed as errors.
Before (Invalid document 👇 with syntax error)
After (Invalid document 👇 with syntax error)
(document with spec specific errors 👇)
Related Issue
1048
874