-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CheckStyle doesnt work with Mypy extension or on lower versions #331
Comments
EDIT: I found a problem... I remembered that I recently installed also Mypy extension for handling Mypy for Python. And as you can see there is some weird conflict. I solved it by turning off Mypy extension for my Java workspace |
sounds wired, I'm trying to understand why a Python extension could affect Java ones. 🤔 |
And one more thing: checkstyle rules differs from different checkstyle version. You need to make sure the version and your rules are compatibale |
There is an option called: Mypy: Run Using Active Interpreter I had it set to True, because on False it didnt work on my Python files and this option when it is set to True seems to be a problem |
I simply have to use latest version - 10 - otherwise plugin has some problems too |
But you are using Checkstyle to check your Java code right? I cannot understand my the Python's setting would affect that. |
But there is still this message when i set checkstyle version on 8.43 for example (In IntelliJ it works with this version too): {"message":"com/puppycrawl/tools/checkstyle/api/AuditListener","cause":{"message":"com.puppycrawl.tools.checkstyle.api.AuditListener"}} |
Would you mind to share a sample project? |
For fixing that message i mentioned above? Because this speccifically is my school project which, I am afraid, I can't share 😄 |
^ |
Checkstyle messages me this: {"message":"LineLength is not allowed as a child in Checker"}.... It worked with this xml on my main computer and i think even on this one...
the important part of XML file looks like this:
Language support extension for Java by RedHat writes this:
[Error - 1:08:15] 9. 3. 2022 1:08:15 Problems occurred when invoking code from plug-in: "org.eclipse.jdt.ls.core".
null
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at com.shengchen.checkstyle.runner.DelegateCommandHandler.executeCommand(DelegateCommandHandler.java:58)
at org.eclipse.jdt.ls.core.internal.handlers.WorkspaceExecuteCommandHandler$1.run(WorkspaceExecuteCommandHandler.java:215)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.jdt.ls.core.internal.handlers.WorkspaceExecuteCommandHandler.executeCommand(WorkspaceExecuteCommandHandler.java:205)
at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.lambda$4(JDTLanguageServer.java:507)
at org.eclipse.jdt.ls.core.internal.BaseJDTLanguageServer.lambda$0(BaseJDTLanguageServer.java:75)
at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture$Completion.exec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinPool.scan(Unknown Source)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: LineLength is not allowed as a child in Checker
at com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:493)
at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:198)
at com.shengchen.checkstyle.checker.CheckerService.setConfiguration(CheckerService.java:67)
at com.shengchen.checkstyle.runner.DelegateCommandHandler.setConfiguration(DelegateCommandHandler.java:79)
... 17 more
[Error - 1:08:15] 9. 3. 2022 1:08:15 Error in calling delegate command handler
null
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at com.shengchen.checkstyle.runner.DelegateCommandHandler.executeCommand(DelegateCommandHandler.java:58)
at org.eclipse.jdt.ls.core.internal.handlers.WorkspaceExecuteCommandHandler$1.run(WorkspaceExecuteCommandHandler.java:215)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.jdt.ls.core.internal.handlers.WorkspaceExecuteCommandHandler.executeCommand(WorkspaceExecuteCommandHandler.java:205)
at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.lambda$4(JDTLanguageServer.java:507)
at org.eclipse.jdt.ls.core.internal.BaseJDTLanguageServer.lambda$0(BaseJDTLanguageServer.java:75)
at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture$Completion.exec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinPool.scan(Unknown Source)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: LineLength is not allowed as a child in Checker
at com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:493)
at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:198)
at com.shengchen.checkstyle.checker.CheckerService.setConfiguration(CheckerService.java:67)
at com.shengchen.checkstyle.runner.DelegateCommandHandler.setConfiguration(DelegateCommandHandler.java:79)
... 17 more
And when I switch Checkstyle version on 10 (where it was originally), it writes this: {"message":"com/puppycrawl/tools/checkstyle/api/AuditListener","cause":{"message":"com.puppycrawl.tools.checkstyle.api.AuditListener"}}
And this in Java Support extension:
Caused by: java.lang.NoClassDefFoundError: com/puppycrawl/tools/checkstyle/api/AuditListener
at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.base/java.lang.Class.getConstructor0(Unknown Source)
at java.base/java.lang.Class.getConstructor(Unknown Source)
at com.shengchen.checkstyle.runner.CheckstyleLoader.loadCheckerService(CheckstyleLoader.java:49)
at com.shengchen.checkstyle.runner.DelegateCommandHandler.setConfiguration(DelegateCommandHandler.java:75)
... 17 more
Caused by: java.lang.ClassNotFoundException: com.puppycrawl.tools.checkstyle.api.AuditListener
at java.base/java.net.URLClassLoader.findClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
... 23 more
[Error - 1:21:00] 9. 3. 2022 1:21:00 Error in calling delegate command handler
null
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at com.shengchen.checkstyle.runner.DelegateCommandHandler.executeCommand(DelegateCommandHandler.java:58)
at org.eclipse.jdt.ls.core.internal.handlers.WorkspaceExecuteCommandHandler$1.run(WorkspaceExecuteCommandHandler.java:215)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.jdt.ls.core.internal.handlers.WorkspaceExecuteCommandHandler.executeCommand(WorkspaceExecuteCommandHandler.java:205)
at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.lambda$4(JDTLanguageServer.java:507)
at org.eclipse.jdt.ls.core.internal.BaseJDTLanguageServer.lambda$0(BaseJDTLanguageServer.java:75)
at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture$Completion.exec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinPool.scan(Unknown Source)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: com/puppycrawl/tools/checkstyle/api/AuditListener
at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.base/java.lang.Class.getConstructor0(Unknown Source)
at java.base/java.lang.Class.getConstructor(Unknown Source)
at com.shengchen.checkstyle.runner.CheckstyleLoader.loadCheckerService(CheckstyleLoader.java:49)
at com.shengchen.checkstyle.runner.DelegateCommandHandler.setConfiguration(DelegateCommandHandler.java:75)
... 17 more
Caused by: java.lang.ClassNotFoundException: com.puppycrawl.tools.checkstyle.api.AuditListener
at java.base/java.net.URLClassLoader.findClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
... 23 more
The text was updated successfully, but these errors were encountered: