Skip to content

Inaccurate analysis due to outdated classpath #6

@AB-xdev

Description

@AB-xdev

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:

  1. 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"
  2. 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
  3. Scanning all files - This will likely massively impact performance and also requires filtering out the results.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions