sonar-checkstyle icon indicating copy to clipboard operation
sonar-checkstyle copied to clipboard

get rid of dependency to sonar-java-plugin

Open romani opened this issue 9 years ago • 2 comments

this dependency is required only do smth with classloader. We should implement this ourself. We should not depend on this artifact at all.

romani avatar Dec 18 '16 02:12 romani

@muhlba91,

Unfortunately, I don't get exactly what important pieces it extracts and I quickly skimmed through it's code as well as JavaClasspath which it utilizes to see how we could easily duplicate this ode

Checkstyle should not rely on class path. There were few Checks that tried usage of class path, but such implementation endup very problatic and unstable, so we removed it. But looks like plugin tried to address this problem of classpath, BUT it is not supported feature of checkstyle.

There are few Checks still use classpath, but they will work fine without it, as they do in other plugins.

Usage of such plugin might be a reason why users report no action at non Java files #207 . Checkstyle plugin should not use classpath and should be able to process non-java files.

romani avatar Apr 15 '19 12:04 romani

@muhlba91 ,

checkstyle completely disabled any class path activity in all checks. There still such methods in Checker/Treewalker but they do nothing in core library and only exists for compatibility for some time. Will be completely removed ones maven checkstyle plugin is released after 3.1.0 .

Sonar plugin completely ok to drop any features related to classpath and remove this dependency to plugin.

romani avatar Jan 22 '20 21:01 romani

Fix is merged

romani avatar Oct 21 '22 02:10 romani