eclipse-shellwax / shellwax

Shell script editor plugin for Eclipse
https://marketplace.eclipse.org/content/shellwax
Eclipse Public License 2.0
17 stars 12 forks source link

No shellcheck annotations #116

Closed chscf closed 6 months ago

chscf commented 6 months ago

Hello,

I'm not quite sure if this is the right place for the issue I'm experiencing, but I'll give it a try ... :-)

I'm running Eclipse CDT in Linux, and I've installed the ShellWax plugin (most recent versions of all components). I'm not sure, but I think I do remember that some time ago, when editing a bash script in Eclipse, the editor showed annotations generated by shellcheck on the right border of the editor window. And I think to remember that this was a ShellWax feature. However, I don't have theses annotations any more, and I don't know why...

Could you possibly give me a hint on what's going wrong?

Thanks and best regards, Christian

akurtakov commented 6 months ago

This is still feature of this plugin image

One caveat is that the plugin doesn't ship shellcheck but relies it being on your PATH so please check that.

chscf commented 6 months ago

Thanks for the quick response!

shellcheck is installed an on my path:

> which shellcheck
/usr/bin/shellcheck
> shellcheck --version
ShellCheck - shell script analysis tool
version: 0.10.0
license: GNU General Public License, version 3
website: https://www.shellcheck.net

Thanks, Christian

akurtakov commented 6 months ago

In case you have just installed it, please restart your eclipse so Bash LS looks for shellcheck again. If that is not the case I am kind of clueless as the plugin relies on https://github.com/bash-lsp/bash-language-server to find and use shellcheck.

chscf commented 6 months ago

I had shellcheck installed already, but I didn't have bash-language-server installed before. I installed it and restarted eclipse, but still no success.

> node --version
v20.11.0
> bash-language-server --version
5.1.2
> shellcheck --version
ShellCheck - shell script analysis tool
version: 0.10.0
license: GNU General Public License, version 3
website: https://www.shellcheck.net

Is there anything I need to configure/enable within eclipse regarding shellwax? How can I check if shellwax active at all? Maybe I'm using the wrong editor?

editor

Thanks, Christian

akurtakov commented 6 months ago

This is the right editor. Here are few things to try:

  1. Please make sure you run Eclipse with Java 21, you have Eclipse 2024-03 and all the other plugins uptodate.
  2. Enable log for bash ls and check whether there is anything wrong in it. image
chscf commented 6 months ago

Eclipse and all plugins are up-to-date (2024-03). However, my Java is:

> java --version
openjdk 17.0.10 2024-01-16
OpenJDK Runtime Environment Temurin-17.0.10+7 (build 17.0.10+7)
OpenJDK 64-Bit Server VM Temurin-17.0.10+7 (build 17.0.10+7, mixed mode, sharing)

Is JDK 21 mandatory?

And eclipse doesn't seem to know anything about the bash-language-server: prefs_sml

Thanks, Christian

akurtakov commented 6 months ago

Yes, shellwax has been updated to require Java 21 a month or two ago.

akurtakov commented 6 months ago

As I see you have dockerfile editor (it requires Java 21 in master too - https://github.com/eclipse-linuxtools/org.eclipse.linuxtools/commit/52ecfc4b61511fe21595dd7743d64519b198eb63 ). Overall Eclipse 2024-06 will ship with Java 21 and plugins started to move to it.

chscf commented 6 months ago

So finally it works! I did a fresh install of eclipse with java-21 as my system-vm, and now it works!

Thanks a lot for your support! Regards, Christian

akurtakov commented 6 months ago

You're welcome!