Skip to end of metadata
Go to start of metadata
You are viewing an old version of this page. View the current version. Compare with Current ·  View Page History

The C# plugins ecosystem is a set of Sonar plugins used to monitor the quality of .NET software written in the C# language.
The goal is to make C# a first-class citizen in Sonar - like Java can be.


Below are the main steps to quickly get started.
You will find the links to the rest of the documentation at the end of this page.

 

Live example

If you want to see a live example of the capabilities of the C# plugins ecosystem, you can have a look at the analysis of the MyBatis.Net project on Nemo.

Name

C# Plugins Ecosystem

Authors

Fabrice Bellingard (Twitter) and Alexandre Victoor (Twitter)

Jira

http://jira.codehaus.org/browse/SONARDOTNT

Latest Version

2.0 (November 13th, 2012)
(check version compatibility )

Requires Sonar

3.0 or higher

License

GNU LGPL 3

Sources

https://github.com/SonarCommunity/sonar-dotnet

Download

CSharpPluginsEcosystem-2.0.zip

1. Install

  1. Check the requirements
  2. Installation and Upgrade
  3. Install the C# plugins
    • Download the ZIP file of the C# Plugins Ecosystem distribution (top right of this page).
    • Copy all the desired plugins of the C# plugins ecosystem in Sonar plugins extension folder.
  4. Install the tools required by the selected C# plugins
    • For instance, Gallio or FxCop
    • Gendarme and StyleCop do not necessarily need to be installed
  5. Check the prerequisites, mainly:
    • Your .NET solution must be compiled

2. Configure

  1. Create a Sonar file for your solution
    • A very simple one can be:

    • Place it in the same folder as the Solution file (".sln")
  2. If you don't want to use the default settings of a plugin, you can override them
  3. You can also use the sample application available from GitHub. Both config flavors are available in this sample. You can choose to use the sonar-project.properties file (recommended) or the maven pom.xml file.

3. Run!

  1. Launch the analysis...
    • Assuming you installed the Sonar Runner, this is as simple as:

  2. ...and check the results!
    • Once the analysis is completed, just open your favorite web browser (http://localhost:9000 if you installed the standalone version)
    • Enjoy!

Roadmap

  • Support of preprocessing instructions by the parser
  • Branch coverage support
  • Rules engine built on the squid parser
  • Design metrics such as LCOM4
  • Mutation testing using OpenMutate

To go further...

Change Log

Release 2.0 (12 issues)
Type Key Summary Priority
Improvement SONARDOTNT-49 On C# projects, replace the "distribution of complexity by class" by the "distribution of complexity by file" Major
Improvement SONARDOTNT-282 Merge C# Squid plugin into C# Core plugin Major
Improvement SONARDOTNT-276 NPE if "sonar.gallio.coverage.tool" is set to "none" Major
Improvement SONARDOTNT-274 Allow multi-language solution analysis Major
Task SONARDOTNT-269 Rename the devkit to sslr-csharp-toolkit Major
Improvement SONARDOTNT-273 Upgrade to SSLR 1.14 and Squid Bridge 2.2 Major
Improvement SONARDOTNT-270 Add XPath Check Major
Bug SONARDOTNT-3 Gendarme sensor crashes with skipped modules Major
New Feature SONARDOTNT-39 Offer a GUI that helps visualizing the AST of a C# file Major
Improvement SONARDOTNT-278 Disable coverage analysis when "sonar.gallio.coverage.tool" is set to "none" Minor
Improvement SONARDOTNT-277 Update plugins properties to use specific PropertyType Minor
Bug SONARDOTNT-67 c# StyleCop rules not handled: LayoutRules#ElementMustNotBeOnSingleLine, LayoutRules#AllAccessorsMustBeMultiLineOrSingleLine Trivial

 

Release 1.4 (13 issues)
Type Key Summary Priority
Bug SONARDOTNT-117 ndeps fatal error when assemblies not found Critical
Improvement SONARDOTNT-231 Make the .Net plugin compatible with the Developer Cockpit plugin Major
Bug SONARDOTNT-113 Absolute paths and the reuse reports mode Major
New Feature SONARDOTNT-185 Implement support for dotcover teamcity coverage xml reports Major
Improvement SONARDOTNT-202 Add new placeholders for file patterns Major
Improvement SONARDOTNT-211 Add Sqale model inside the C# Core plugin Major
Task SONARDOTNT-199 Open-source C# Squid plugin Major
New Feature SONARDOTNT-175 Add new Common Rules repository Major
Improvement SONARDOTNT-209 Reuse the artifactId of the solution to build the keys of project in this solution Major
Improvement SONARDOTNT-240 Complete platform parameter support Major
Improvement SONARDOTNT-219 Adds suport for StyleCop 4.7 and above Major
Improvement SONARDOTNT-230 Allow to set parameters for StyleCop rules Minor
Bug SONARDOTNT-148 Fix URL for Update Center Trivial

 

Release 1.3 (8 issues)
Type Key Summary Priority
New Feature SONARDOTNT-186 Display "assert count" metric for tests Major
Improvement SONARDOTNT-229 Use the latest verison of C# Squid Plugin (improvements on the C# parser) Major
New Feature SONARDOTNT-191 Support for Integration Tests Major
Bug SONARDOTNT-136 Error while parsing result file from Gallio Major
Bug SONARDOTNT-79 Duplication detection should ignore the "using" statements in C# Major
New Feature SONARDOTNT-178 Libraries/Dependencies/Design pages Major
Improvement SONARDOTNT-226 Change name of rules repository to Sonar Major
Bug SONARDOTNT-151 Parsing errors because of '?' characters Major

 

Release 1.2 (6 issues)
Type Key Summary Priority
Bug SONARDOTNT-144 Coverage with NCover brings measures for only one project in a solution Major
Bug SONARDOTNT-115 Only the first assembly specified via 'sonar.gallio.coverage.excludes' is actually excluded Major
New Feature SONARDOTNT-174 OpenCover support Major
Bug SONARDOTNT-83 CSharp Plugin does not support Linked Resources Major
Bug SONARDOTNT-149 Wrong test coverage when using links Major
Bug SONARDOTNT-154 No backward/maven-dotnet compatibility on SDK directories config keys Major

 

Release 1.1 (14 issues)
Type Key Summary Priority
Bug SONARDOTNT-93 Coverage does not work on all projects Blocker
Bug SONARDOTNT-165 O% test coverage on codeless interfaces Major
Bug SONARDOTNT-100 'sonar.gallio.coverage.excludes' does not work for NCover Major
Bug SONARDOTNT-132 Too many uncovered lines found Major
Improvement SONARDOTNT-221 Configuration mechanism to locate test assemblies Major
Improvement SONARDOTNT-206 Add support for platform parameter in MSBuild Major
Bug SONARDOTNT-86 No merge of exclusion filters Major
Improvement SONARDOTNT-238 Add "**/*.g.cs" as part of the default exclusions Major
Bug SONARDOTNT-139 Configuration mechanisms of gendarme and fxcop plugins for assemblies locations Major
Bug SONARDOTNT-106 sonar.fxcop: the assemblyDependencyDirectories parameter does not take an absolute path Major
Bug SONARDOTNT-75 Reuse mode does not work for Gallio coverage reports Major
Improvement SONARDOTNT-207 Gallio runner parameter Major
Bug SONARDOTNT-164 FxCop does not permit to specify an assembly dependencies directory relative to the solution Major
Bug SONARDOTNT-141 Coverage report is looked relative to the working directory instead of relative to the pom.xml Major

 

Release 1.0 (24 issues)
Type Key Summary Priority
Bug SONARDOTNT-72 C# plugins make analysis on java projects impossible Blocker
Improvement SONARDOTNT-210 Projects and folders should not be mixed Major
Improvement SONARDOTNT-223 New rule API for Stylecop, fxcop and gendarme Major
New Feature SONARDOTNT-176 Cleanup properties Major
Bug SONARDOTNT-146 Incoherence between .Net and Java comments report Major
Task SONARDOTNT-200 Remove dependency to maven api in module dotnet-commons Major
Bug SONARDOTNT-145 Incomplete build configurations support Major
Bug SONARDOTNT-118 NPE on the Gallio CoverageDecorator Major
Bug SONARDOTNT-73 Parsing error on a Gallio result file Major
New Feature SONARDOTNT-181 Make it possible to implement rules based on SonarSource C# Parser Major
New Feature SONARDOTNT-190 Make it possible to run a Sonar analysis with the Simple Java Runner Major
Task SONARDOTNT-195 Add native support of Sonar way to handle multi-module in a .NET solution Major
Improvement SONARDOTNT-208 Better support for copy-paste detection Major
Improvement SONARDOTNT-216 Remove requirement on Java 6 for Sonar plugin execution Major
Improvement SONARDOTNT-235 Embed SonarSource C# Parser to remove dependency on SourceMonitor Major
Bug SONARDOTNT-97 FxCop/Gendarme failures on projects without assemblies Major
Bug SONARDOTNT-157 Property sonar.branch cannot be used Major
Bug SONARDOTNT-134 Bad behavior on weird FxCop exit codes Major
Bug SONARDOTNT-68 It is not currently possible to pass the build configurations to use for the analysis Major
Task SONARDOTNT-198 Wiki : parser limitations Major
Bug SONARDOTNT-163 A solution cannot have the same name as one of its project Major
Bug SONARDOTNT-89 Error while trying to get the next element name Major
Wish SONARDOTNT-262 .net plugin should not force using Java 1.6 on other projects Major
New Feature SONARDOTNT-193 Support of user extensions for fxcop/gendarme/stylecop Minor

Labels
  • None