SonarLint for Visual Studio Code 2.2.0 Released - Support for GitHub Codespaces

Hello VSCode users,

as you probably have heard, GitHub recently launched Codespaces for all organizations using GitHub Team or GitHub Enterprise Cloud plans. Codespaces provides cloud-powered development environments, where developers are able to use Visual Studio code along with the extensions they are used to, either by using their browser or by attaching their local installation of Visual Studio Code to the remote Codespace.

At SonarSource we’d like to support organizations choosing Codespaces by making sure SonarLint works correctly for them. That is why we have tested all SonarLint features in Codespaces and we are happy to announce that you can use SonarLint in Codespaces, for all the languages we support in VSCode, including Java, JavaScript, TypeScript, Python, HTML and PHP.

You are also able to share your quality profile and analysis settings with the other contributors of your projects, and benefit from a few additional languages by using SonarLint in combination with SonarQube or SonarCloud with the connected mode.

With this new version, we have made the following small adaptations:

  • We’ve enhanced our telemetry collection to collect flags indicating whether SonarLint is run in a Codespace, so that we can better follow-up needs and issues from our Codespaces users
  • We’ve adapted our readme to mention specific information you should know when you use SonarLint with Codespaces; by the way, the only SonarLint feature that won’t work there is the ability to open a Security Hotspot from SonarQube into SonarLint.

Once you have created your Codespace, you can install SonarLint exactly as you would do to install it in Visual Studio Code :slight_smile:

I’d like to point your attention to the fact that each Codespace is a separate container with its specific settings (including extension settings); unless you share settings, this means every time you create a new Codespace you will need to install SonarLint (just like you’d need to install SonarLint when you install VSCode on a new machine). To avoid this, you can activate Setting Syncs so that settings are synchronized among the different VSCode instances and Codespaces linked to your GitHub account; you can find more information on settings synchronization here.

Enjoy using SonarLint in your Codespace! If you get a chance to let us know what you think and to suggest how we can make SonarLint even better, we’d be happy to hear your feedback.

And if you need any help, you can use the dedicated channel in this forum.