Bug 489921 - Error: ShellCheck: json parse failed with error SyntaxError when opening bash files in Kate using bash-language-server LSP Client
Summary: Error: ShellCheck: json parse failed with error SyntaxError when opening bash...
Status: RESOLVED UPSTREAM
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: 24.05.2
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-08 12:08 UTC by Aleks
Modified: 2024-09-27 12:27 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aleks 2024-07-08 12:08:25 UTC
SUMMARY
After installing the snap of bash-language-server, opening any bash script in Kate will result in a strange error in the Output window of Kate
I've seen other people run into the same here error here:
 https://forum.ubuntuusers.de/topic/kate-und-lsp/

STEPS TO REPRODUCE
1. Install snap of bash-language-server: sudo snap install bash-language-server
2. Open Kate
3. Open any bash file
4. It should ask to activate the LSP Client, click: yes

OBSERVED RESULT
The Output window of Kate shows the following error:
[13:51:48  LSP Client Log] Started server bash@: /snap/bin/bash-language-server start
[13:51:49  LSP Server Log] bash@
[Error] 11:51:49.384 ERROR ⛔️ Error while linting: Error: ShellCheck: json parse failed with error SyntaxError: Unexpected end of JSON input
out:
err:

EXPECTED RESULT
Kate opening bash files with language linting working and not producing an error after starting the bash-language-server plugin.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 6.1.2
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.0

ADDITIONAL INFORMATION
Also installed KDE Neon on a VM just to make sure it wasn't just happening on my PC.
I also installed the marksman Markdown language client to see if any errors would appear. There were no errors when opening .md files using the markdown client.
Comment 1 Waqar Ahmed 2024-09-27 12:27:32 UTC
This seems to be a bash lsp issue, please file an issue there.

https://github.com/bash-lsp/bash-language-server/blob/2c015de54b873c0dd9f595ebfdb94521a6bfd43c/server/src/shellcheck/index.ts#L175