SonarLint for Visual Studio 8.0 - Open SonarQube issues in the IDE

Hello Visual Studio users,

The SonarLint version 8.0 of Visual Studio is out!

With this release, I am really happy to announce the possibility of opening an issue in Visual Studio from SonarQube. We wanted to provide developers with a handy option to open in the IDE the code containing an issue they’re reviewing in SonarQube. After reviewing the details of an issue in SonarQube, you will be able to quickly locate the code containing the issue in your IDE and then fix it faster.

To benefit from this functionality, you’ll need to:

  • Use the right SonarQube version (10.3+)
  • Use the latest SonarLint version (8.0)
  • 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.

We also improved the comments you can add when muting an issue in Visual Studio. Indeed you can now format them to have a better structure.

This release comes with seven new rules for ASP.NET core:

  • S6966: Awaitable method should be used
  • S6967: ModelState.IsValid should be called in controller actions
  • S6964: The value type properties of a model class should be nullable or marked as “Required” to avoid under-posting
  • S6968: Actions that return a value should be annotated with ProducesResponseTypeAttribute containing the return type
  • S6965: You should use HttpAttribute in API controller actions
  • S6962: You should pool HTTP connections with HttpClientFactory
  • S6960: Controllers should not have too many responsibilities

Note that this version is only supported for VS 2022.

You can find the release notes here.

Thank you for your continued support!

Alexander

1 Like