-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
-
-
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] Cyclomatic complexity is misreported (lack of clearing metrics cache) #1984
Comments
We could probably disable the global metrics cache entirely until 7.0. I'm doubt it's very useful anyway. With 7.0 we can use a cache on the nodes, as described on the wiki. |
I am stumbling to this issue again. How to clear the global metrics cache? |
it seems exiting eclipse and deleting the directory .metadata/.plugins/net.sourceforge.pmd.eclipse.plugin/ in the workspace clears the cache. Please confirm. |
I can reproduce it - it's definitively the metrics cache, that is not reset, when PMD is executed multiple times within the same JVM.
Restarting Eclipse is enough. You don't need to delete any files. |
My experience does not confirm this. |
You'll also need to rerun PMD - otherwise eclipse shows the old markers. |
Affects PMD Version:
6.13.0
Rule:
CyclomaticComplexity
Description:
I had a function with a high cyclomatic complexity. I started to reduce it, but even when it became a linear one, I still have the warning:
I am using PMD Plug-in 4.2.0.v20190331-1136 in eclipse.
Tried to clear violations and check again, clean the source code and rebuild from eclipse, clean the source code with
git clean -fdx
, refresh the project from disk, and all combinations thereof.Code Sample demonstrating the issue:
This code sample still have the warning above:
Running PMD through: [CLI | Ant | Maven | Gradle | Designer | Other]
eclipse
The text was updated successfully, but these errors were encountered: