checkstyle / eclipse-cs

The Eclipse Checkstyle plug-in integrates the Checkstyle Java code auditor into the Eclipse IDE. The plug-in provides real-time feedback to the user about violations of rules that check for coding style and possible error prone code constructs.
https://checkstyle.org/eclipse-cs
GNU Lesser General Public License v2.1
97 stars 55 forks source link

Checkstyle execution failed due to an internal error. Please check the error log for details. #94

Closed srasku closed 6 years ago

srasku commented 6 years ago

I am running Eclipse Photon (4.8.0) with Checkstyle 8.11.0 plugin.

When I right-click my file and select "Checkstyle >> Check Code with Checkstyle" I get "Checkstyle execution failed due to an internal error. Please check the error log for details."

srasku commented 6 years ago

Here's the log file and the checkstyle configuration.

rnveach commented 6 years ago

From the CLI checkstyle, your configuration is fine for version 8.11 .

The metadata log file doesn't really say any errors for eclipse-cs. It is just showing errors for jgit and gradle.

java.lang.ClassNotFoundException: org.eclipse.jgit.lfs.BuiltinLFS cannot be found by org.eclipse.egit.core_5.0.0.201806131550-r org.gradle.api.UncheckedIOException: Cannot download published Gradle versions. java.net.UnknownHostException: dev.eclipse.org: nodename nor servname provided, or not known

can you see any error for eclipse-cs in the error log view?

srasku commented 6 years ago

I've exported the Eclipse error log and attached it. I didn't notice anything regarding eclipse-cs.

romani commented 6 years ago

Looks like it is unrelated to checkstyle plug-in. @srasku , is it happening all the time ? Please share so other details of your eclipse (os type and version, Java version, other plug-in version). Looks like problem with git plugin in eclipse.

srasku commented 6 years ago

It always happens. Checkstyle never works.

I'm running on macOS 10.13.5.

$ javac -version
javac 1.8.0_144

I've removed the Git plugins but the problem still occurs.

eclipse plugin versions

romani commented 6 years ago

Is it still the same problem java.lang.ClassNotFoundException: org.eclipse.jgit.lfs.BuiltinLFS cannot be found by org.eclipse.egit.core_5.0.0.201806131550-r ?

Try to update jgit plugin, I see it in your plugin list. I mite be good to look at sources of such plugin in case smth is changed ( class is renamed or moved to diff package)

srasku commented 6 years ago

I've updated egit and I don't see that error any more.

I also reconfigured my proxy which allowed me to connect to Eclipse Marketplace. I wasn't able to do that before. Unfortunately, Checkstyle is still not working.

romani commented 6 years ago

From your log :

!MESSAGE Checkstyle-Plugin: SuppressionCommentFilter is not allowed as a child in Checker !STACK 0 com.puppycrawl.tools.checkstyle.api.CheckstyleException: SuppressionCommentFilter is not allowed as a child in Checker

Looks like your confirmation need to be updated as you updated version of checkstyle. Take a look at breacking changes in http://checkstyle.sourceforge.net/releasenotes.html#Release_8.1 for SuppressionCommentFilter and follow migration recommendations.

rnveach commented 6 years ago

checkstyle.txt com.puppycrawl.tools.checkstyle.api.CheckstyleException: SuppressionCommentFilter is not allowed as a child in Checker

The configuration you gave us has no SuppressionCommentFilter. Either you gave us the wrong configuration or your eclipse isn't using the configuration you think it is.

srasku commented 6 years ago

Thanks, @rnveach. I didn't checkin my Checkstyle configuration. Restoring it is the final step to solving this problem.

It's working now.

msaifusmani commented 4 years ago
Screen Shot 2020-03-24 at 11 42 31 PM

I am also getting the same error with regards to Checkstyle, @srasku how did you fix it? How did you restore it as you said in your last response?