-
Notifications
You must be signed in to change notification settings - Fork 419
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
Include both start and end line_no and column in issue #1047
Comments
Hi, I notice just now that I never commented after reading the linked PR's discussion. Sorry for that. As was discussed in the linked PR, Credo's issues have a Deriving the |
Checking in 😎 |
Sorry, we just had a baby over here haha. In the second screenshot the column info is just wrong, so calculating the end column using the trigger isn't going to be accurate. But assuming that is just a bug in certain checks, then yes it can be doable as long as the span shouldn't cover multiple lines. Should the cyclomatic complexity check highlight the entire case expression or just the word case? For example. |
Yes. I fixed most of them three weeks back. Will be released soon.
Here I think the trigger should always be the function's name as it is the function that is perceived as "too complex". But CC is a really ... controversial ... check/metric. in the sense that it calls on people to change their flow to satisfy a linter. I get those warnings for perfectly readable functions and think I would not include it again, if there every came a Credo 2.0. |
@mhanberg These fixes are now live in Credo |
Nice! I'll go ahead and close the issue. Thanks for working through it! |
What were you trying to do?
Issues include a
line_no
andcolumn
field, but for editors to be able to correctly highlight the problems, they need more information.You can see here, that only the first character of the code is underlined.
You can also see here, where the column information is not correct in general
Expected outcome
The issue includes the text document full range of the problem
Actual outcome
The issue includes only the start of the range, and that is not accurate sometimes.
The text was updated successfully, but these errors were encountered: