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
Duplicated issues #467
Comments
Either it should show each line separately with the correct |
It seems the issue is reported on the wrong node. The whole function node instead of just the variable node. |
6 tasks
kylekatarnls
added a commit
that referenced
this issue
Aug 21, 2023
And use line of first occurrence instead of line of parent function Add test for uncovered exceptions Fix #467
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I found duplicated issues, specifically for the rule
CamelCaseParameterName
(don't know if it happens with other rules), due to non-specificbeginline
andendline
attributes. Maybe it's related to #223, but the errors reported in that issue are different.Reproducible steps:
test.php
with these contents:phpmd test.php xml controversial
. You get the following output:As you can see, the variable
$parent_style is used
3 times, at lines 3, 4 and 8, so I think thebeginline
andendline
attributes should not be set to the function scope where the variable is used, but to the real line in which the variable is used.My environment:
The text was updated successfully, but these errors were encountered: