More and more of you are using VS Code to develop .NET applications, and in fact, supporting C# analysis in SonarLint for VS Code is the most requested feature in our roadmap.
The new version of SonarLint delivers initial support for C# code analysis; this is available to everyone, either using SonarLint alone or together with SonarQube or SonarCloud.
Please refer to this documentation page for the requirements and the configuration options.
Although we’ve tested it internally, please bear in mind that this is a first release supporting C#, so if you find any glitch or if the analysis does not work with your configuration, please reach out here in our Community forum - your feedback is crucial in helping us enhance the feature in upcoming releases!
This month, we’ve also added the possibility to open any issue you’re investigating in SonarQube into the IDE so that you can investigate it and fix it with all the help SonarLint provides (dataflow navigation, rule description, quick fixes) without having to locate the right file and line of code manually.
To benefit from this functionality, you’ll need to:
- Use the very last SonarQube version (10.3): it is not available for download yet, but it will be ready in a few days.
- Use the latest SonarLint version (4.0.1)
- Use SonarLint in connected mode
- Ensure the project and branch you have opened in the IDE correspond to the one containing the issue you’re reviewing in SonarQube.
SonarLint will automatically open the correct file and bring the focus to the line of code containing the issue
In this release, we’ve also tightened the integration of SonarLint with SonarCloud: any issue or security hotspot status change (e.g. Won’t Fix, False Positive, Safe) done in SonarCloud will be instantly synchronized to the IDE so that you can focus on relevant issues.
We’ve added a lot of new detections to help you build Clean Code, for example:
- 6 Java rules dedicated to the Spring framework
- 5 Python rules for the Pandas library
Finally, please be advised that we’re raising the minimum required Java runtime version to 17. If you run VS Code in one of those platforms:
** Windows x86-64*
** Linux x86-64*
** macOS x86-64 (Intel Macs) and arm-64 (Apple Silicon Macs)*
and you haven’t manually specified a JRE using the sonarlint.ls.javaHome then you’re already all set; otherwise, please make sure a JRE version >=17 is available in your system and correctly referenced (see here how you can do that).
The release notes are here, enjoy!