-
Notifications
You must be signed in to change notification settings - Fork 5
Increment for One Indexed reporting of warnings in DFA CLI output #127
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
Increment for One Indexed reporting of warnings in DFA CLI output #127
Conversation
|
Im not too adverse to adding a fix letting the dfa client output 1-indexed line numbers, however this is not the right place to do it as you are changing the DFA's internal representation to 1-indexed. My suggestion is to add a command-line option to the DFA that makes it add one when printing out the numbers in 'output_errors'. |
that means that we will need to change the tool invocation? |
I think the best way forward to avoid making this change to the dfa wrapper on your end, is to apply what Jonatan suggests here, but with the opposite logic. That means, the default behavior is 1 indexed, and there is an option to use the Zero index format. I think this makes sense as file lines are not usually displayed as zero indexed in text editors. |
|
that would be great if we do not need to change anything in how we call the tool |
Yes this is also fine. |
There is now a command-line option |
|
Needs rebase on main branch and changelog entry. Otherwise looks good. |
Done here. I believe this is ready for review and merge. |
4e6cbb4 to
ee42ff9
Compare
VP Developers have pointed out reported warnings are displayed with a line number which is off by one.
Adding one in this line seems like a quick fix for this, but I'd like to know if there are suggestions of another fix for this.
DFA was originally used for testing, but its now part of the integration into VP development PR checks for DML code, so I think its important for the messages to align with expectations from developers and avoid any confusion when trying to apply corrections for these diagnostics.