-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[java] XPath "//MethodCall/AmbiguousName" not match #4946
Comments
You should probably write
This should also work in eg just |
You can set the auxclasspath on the designer to test this out from the View -> Analysis Classpath menu. |
How about a prefix match against a package name? Below works in PMD v6.x:
Is there a way to do it in PMD v7? Thank you very much! |
Currently you can do that in XPath for the import but not for the method call. You can do it with a java rule though. |
Thanks @oowekyala. Any chance that we can have function e.g. |
I don't think a function would be useful here. We can easily add an attribute |
@oowekyala Great! I assume we can then use Please advise if raising a new issue for this feature request is needed. Thanks again! |
Yes, I'd recommend creating a new separate issue for that. Keeping track of all issues, when the details go into long threads is really difficult. |
Affects PMD Version: 7.0.0
Rule: Custom XPath Rule to capture the use of old version of Apache Commons Collections
XPath 3.1
Description:
The XPath expression works in Designer, but not in PMD.
Code Sample demonstrating the issue:
Expected outcome:
PMD should report a violation at line 6 but doesn't. This is a false-negative.
Running PMD through: Gradle
The text was updated successfully, but these errors were encountered: