warpnet / vscode-salt-lint

VSCode extension for running salt-lint in your editor.
https://marketplace.visualstudio.com/items?itemName=warpnet.salt-lint
Other
6 stars 1 forks source link

Vscode salt-lint 0.0.5 doesn't work with salt-lint 0.5.2 (or > 0.4.2) #10

Closed prudhommep closed 2 years ago

prudhommep commented 3 years ago

Environment :

With this configuration nothing is displayed in my sls file under VSC. Command line is OK

I have a working configuration only with salt-lint 0.4.2 (all versions > 0.4.2 doesn't work).

Thank you

devtea commented 3 years ago

I'm seeing this same behavior, though I can't even get older versions of salt-lint to work with the vscode extension.

Environment:

Salt-lint works fine directly from a shell, but I can't get it to trigger in VS Code, manually or otherwise.

I've tried salt-lint versions 0.4.1, 0.4.2, 0.5.0, 0.5.1, and 0.5.2.

Let me know if any additional information would be helpful.

roaldnefs commented 3 years ago

@prudhommep and @devtea would you be able to verify if you also have the extension korekontrol.saltstack installed? It looks like the korekontrol.saltstack extensions is setting duplicate aliases for the language IDs sls and tst. It looks like this issue is related to https://github.com/korekontrol/vscode-saltstack/issues/12.

After deactivating or removing the korekontrol.saltstack extension you should be able to set the correct SaltStack language (see screenshot below).

Screenshot 2021-06-04 at 10 57 06

devtea commented 3 years ago

@roaldnefs Thanks for digging into this. I do have that extension in my list. For more testing, I've disabled ALL extensions except for salt-lint in a new environment but I'm still seeing the same behavior. No salt-lint output in the problems pane, but running it from the shell works as expected.

roaldnefs commented 3 years ago

@devtea would you be able te test it again with the korekontrol.saltstack extension being uninstalled? It looks like the faulty language ID is still causing issues even though the extension is disabled.

devtea commented 3 years ago

@roaldnefs Unfortunately uninstalling the korecontrol.saltstack extension didn't change the behavior. Out of curiosity, I tried a fresh install of vscode (1.57.0), python, salt-lint, and vscode-salt-lint on a separate machine. Same behavior and no extensions installed but vscode-salt-lint.

roaldnefs commented 2 years ago

The issue should now be fixed after upgrading the extensions warpnet.salt-lint to version >=0.1.0 and korekontrol.saltstack to version >=0.0.9. The screenshot below shows the syntax highlighting of korekontrol.saltstack and linting issue originating from warpnet.salt-lint after setting the language to SaltStack (sls) in VSCode.

Screenshot 2021-10-20 at 18 02 23