Code analyzer for C# and VB.NET projects https://redirect.sonarsource.com/plugins/vbnet.html
Product | Quality Gate | Coverage |
---|---|---|
Analyzer | ||
Plugin |
Static analysis of C# and VB.NET languages in SonarQube, SonarCloud and SonarLint code quality and security products. These Roslyn analyzers allow you to produce safe, reliable and maintainable code by helping you find and correct bugs, vulnerabilities and code smells in your codebase.
There are many ways you can contribute to the sonar-dotnet
project.
When contributing, please respect our Code of Conduct.
One of the easiest ways to contribute is to share your feedback with us (see give feedback) and also answer questions from our community forum. You can also monitor the activity on this repository (opened issues, opened PRs) to get more acquainted with what we do.
If you want to fix an issue, please read the Get started pages first and make sure that you follow our coding style.
Before submitting the PR, make sure all tests are passing (all checks must be green).
Area: CFG
label
(they are difficult, can have many side effects and are less likely to be accepted).Note: Our CI does not get automatically triggered on the PRs from external contributors. A member of our team will review the code and trigger the CI on demand by adding a comment on the PR (see Azure Pipelines Comment triggers docs):
/azp run Sonar.Net
- It will run the full pipeline, including plugin tests and promotionIf you would like to work on this project full-time, we are hiring!
To request new rules, Contact us on our Community Forum.
If you have an idea for a rule but you are not sure that everyone needs it, you can implement your own Roslyn analyzer.
Open the rule in SonarQube / SonarCloud, scroll down and (in case the rule has parameters), you can configure the parameters for each Quality Profile the rule is part of.
Use SonarLint Connected Mode to connect to SonarQube and SonarCloud.
The easiest way is to configure a Quality Profile in SonarCloud.
Standalone NuGet packages can be configured the same way as SonarLint in connected mode. You can use SonarLint and SonarCloud to generate the ruleset and rule configuration file SonarLint.xml as described above and embed them into your project.
You can see how we do it in our own repository for SonarLint Connected mode (and you can reuse the same concept for the NuGet package):
Copyright 2014-2023 SonarSource.
Licensed under the GNU Lesser General Public License, Version 3.0