I don’t use SonarLint on VSCode so this may be a dumb question. Is it possible to configure or extend SonarLint on VSCode to talk to a language server for a new language, and report issues in the standard editor ?
This language already has an ANTLR grammar (Java output), SonarQube rules (also written in Java), and the language server implementation (with LSP4J) and VSCode plugin available as a prototype. I’m wondering if it’s possible to easily plug SonarLint to the language server (as a prototype for now).
Hi @gquerret
If you already have a VSCode plugin that communicates with your language server, I fail to see the benefit to use SonarLint? On the client side, SonarLint for VSCode mostly rely on the vscode-languageserver-node
library to “map” LSP diagnostics to VSCode UI, so there is no added value.
Additional SonarLint features like rule descriptions are relying on non standard additions to our language server, so it will not work out of the box.
I would be interested in having rules being “automatically” executed depending on the quality profile assigned to the project, issues being hidden if they’re flagged as FP or Won’t fix, rules description, and all the nice features that come with SonarQube
So if the language server provides an implementation for the diagnostics entry point and your non-standard additions, will the SonarLint plugin use them ? Or do you restrict SonarLint to the languages that you have control over ?
For now SonarLint is focused on SonarSource languages, so your use case is not supported.
Thank you !
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.