PMD requires an up-to-date auxiliary class path (acp) for scans.
Currently the acp is also used by the plugin for scanning - so that not all dependent module files need to be scanned.
This massively speeds up the scan however it might result in inaccurate scan results if the class path is not up-to-date.
There are a few workarounds for this:
- Always enabling IntelliJ's auto-build
- "Auto make" was disabled by default 12 years ago - however all problems are fixed by now - AFAIK.
- Enabling "Allow auto-make to start even if developed application is currently running"
- Manually triggering the compiler before performing a scan. This is problematic because
- the compile process might require special setup
- the process is expensive and blocks the analysis for quite a while
- compilation is quite deeply integrated into IDEA
- currently we encounter a deadlock when a file does not compile, which results in IDEA opening this file, which triggers a recompile, which opens the file again... and so on
- Scanning all files - This will likely massively impact performance and also requires filtering out the results.
PMD requires an up-to-date auxiliary class path (acp) for scans.
Currently the acp is also used by the plugin for scanning - so that not all dependent module files need to be scanned.
This massively speeds up the scan however it might result in inaccurate scan results if the class path is not up-to-date.
There are a few workarounds for this: