-
Notifications
You must be signed in to change notification settings - Fork 1
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
Line numbers shown on lints are not accurate to source code #123
Comments
Marking @danpetry in this since he has also noticed it and might be interested when it gets resolved. |
Reopening this because the problem is unfortunately not solved. I think one problem is that it erases comments, which shifts line numbers. |
Can you post a recipe highlighting this? |
I found it while testing my multi-output branch with this purposefully broken recipe:
This is the output I'm getting:
The correct line number would be 69. Now that I tested it more, it's not the comments. Removing the comments still doesn't get me the correct number, so it was just a coincidence that we had seven lines of comments. The fact that we're getting two messages with two different line numbers is also interesting. |
After more testing: it's not jinja, comments, or empty lines. |
When a lint is produced, the corresponding line number can be off by a few lines. This is because the linter marks the error of the post-rendered version of the recipe that it has, not the original.
Ideally, the line numbers of the lint messages should reflect the recipe that the user can see/work on.
The text was updated successfully, but these errors were encountered: