-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needed
Description
The current Java source analyser is a simple implementation based on regular expressions. It can detect only packages that are explicitly written in the Java source file (such as the ones listed in the imports, or in the code when using a fully qualified class name). However, it's possible to have implicit usages of packages, and the CLI currently doesn't detect them, like for example in the following code:
package mypackage;
import packageA; // Where ClassA is defined in moduleA
import packageC; // Where ClassC is defined in moduleC
public class MyClass {
public void myMethod() {
ClassA a = new CLassA();
ClassC c = a.getB().getC(); // implicit usage of packageB where ClassB is defined <= not detected by the CLI
}
}So it needs to be replaced with a much more elaborate Java syntax parser, able to detect the getB() call and tell what type is the returned value (through an analyse of the ClassA source).
There are probably other cases of implicit package usage, such as those coming from inheritance.
Any volunteer to work on this issue?
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needed