Closed jamesdu-ms closed 1 year ago
Looks like we need to add some logic to wait the language server ready.
Looks like we need to add some logic to wait the language server ready.
Is there any plan to fix it?
vscode-checkstyle-1.4.2.vsix.zip
I've worked for a fix for this issue. Please check if the problem is solved or not and let me know.
Note: The default Checkstyle version is changed to
9.3
. If that does not apply to your Checkstyle configuration, please change the used version accordingly.
1.4.2 looks good, 3ks
Checkstyle does not work (does not highlight errors) each time VS Code is started.
It can be triggered to work by editing a setting, e.g. java.checkstyle.version to a different value, which I assume triggers checkstyle to restart. The actual version selected doesn't matter, when VS Code is closed and reopened it will not work again until editing the setting.json again.
The output window of Checkstyle shows the following exception, which I assume is the root of the problem: TypeError: Cannot read properties of undefined (reading 'sendRequest') at /home/vscode/.vscode-extensions/redhat.java-1.15.0-linux-x64/dist/extension.js:2:698767 at l.h (/.vscode-server/bin/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/api/node/extensionHostProcess.js:96:108784) at l.g (/.vscode-server/bin/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/api/node/extensionHostProcess.js:96:107674) at l.executeCommand (/.vscode-server/bin/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/api/node/extensionHostProcess.js:96:107574) at Object.executeCommand (/.vscode-server/bin/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/api/node/extensionHostProcess.js:117:30781) at Object.t.executeJavaLanguageServerCommand (/home/vscode/.vscode-extensions/shengchen.vscode-checkstyle-1.4.1/dist/extension.js:9:73370) at Object.syncServer (/home/vscode/.vscode-extensions/shengchen.vscode-checkstyle-1.4.1/dist/extension.js:1:82769) at Object.refresh (/home/vscode/.vscode-extensions/shengchen.vscode-checkstyle-1.4.1/dist/extension.js:1:81481) at async Object.initialize (/home/vscode/.vscode-extensions/shengchen.vscode-checkstyle-1.4.1/dist/extension.js:1:79616) at async m (/home/vscode/.vscode-extensions/shengchen.vscode-checkstyle-1.4.1/dist/extension.js:29:20243)
Errors from Dev Tools Console: [[object Object]]Connection got disposed. $onExtensionRuntimeError @ mainThreadExtensionService.ts:79 mainThreadExtensionService.ts:80 Error: Connection got disposed. at Object.dispose (/home/vscode/.vscode-extensions/redhat.java-1.15.0-linux-x64/dist/extension.js:2:1051095) at Object.dispose (/home/vscode/.vscode-extensions/redhat.java-1.15.0-linux-x64/dist/extension.js:2:898091) at b.handleConnectionClosed (/home/vscode/.vscode-extensions/redhat.java-1.15.0-linux-x64/dist/extension.js:2:898279) at b.handleConnectionClosed (/home/vscode/.vscode-extensions/redhat.java-1.15.0-linux-x64/dist/extension.js:2:971911) at t (/home/vscode/.vscode-extensions/redhat.java-1.15.0-linux-x64/dist/extension.js:2:896393) at invoke (/home/vscode/.vscode-extensions/redhat.java-1.15.0-linux-x64/dist/extension.js:2:1052721) at s.fire (/home/vscode/.vscode-extensions/redhat.java-1.15.0-linux-x64/dist/extension.js:2:1053482) at Q (/home/vscode/.vscode-extensions/redhat.java-1.15.0-linux-x64/dist/extension.js:2:1040234) at invoke (/home/vscode/.vscode-extensions/redhat.java-1.15.0-linux-x64/dist/extension.js:2:1052721) at s.fire (/home/vscode/.vscode-extensions/redhat.java-1.15.0-linux-x64/dist/extension.js:2:1053482) at p.fireClose (/home/vscode/.vscode-extensions/redhat.java-1.15.0-linux-x64/dist/extension.js:2:1061373) at Socket. (/home/vscode/.vscode-extensions/redhat.java-1.15.0-linux-x64/dist/extension.js:2:1062958)
at Socket.emit (node:events:538:35)
at Pipe. (node:net:687:12)
This is on MacOS 12.6.3, Visual Studio Code version 1.76.0
.vscode/settings.json: { "java.checkstyle.configuration": "/google_checks.xml", "java.checkstyle.properties": { "basedir": "${workspaceFolder}" }, "java.checkstyle.version": "9.3", }
Repro steps:
Expected: Get highlight over line with checkstyle warning showing the issue
Actual: