Skip to end of metadata
Go to start of metadata
NameC# Ecosystem
Latest version2.1 ( 8 April 2013 )
Requires Sonar version3.0 or higher ( check version compatibility )
DownloadCSharpPluginsEcosystem-2.1.zip
LicenseGNU LGPL 3
DevelopersFabrice Bellingard (Twitter) and Alexandre Victoor (Twitter)
Issue trackerhttp://jira.codehaus.org/browse/SONARDOTNT
Sourceshttps://github.com/SonarCommunity/sonar-dotnet
Live example

If you want to see a live example of the capabilities of the C# Ecosystem, you can have a look at the analysis of the MyBatis.Net project on Nemo. You can also check the C# and VB.NET solution on Nemo to see how Sonar can analyse multi-language .NET solutions.

Description / Features

The C# Ecosystem is a set of Sonar plugins used to monitor the quality of .NET software written in C#.

Note that, since version 2.0, multi-language .NET Solutions (C# + VB.NET) can be analyzed by Sonar. See documentation and project samples.

It is compatible with the Issues Report plugin to run pre-commit local analysis.

Installation

See the C# Ecosystem Installation Guide.

Usage

Running a Sonar analysis

To run a Sonar analysis on a C# solution, it is recommended to use the Sonar Runner. But Maven can also be used to trigger the analysis.

To help you get started, a project sample is available on github. It provides both flavors (Sonar Runner and Maven).

For more details on how to run a Sonar analysis on a C# solution, see the detailed documentation page.

Advanced Settings

Each plugin defines its own properties that are documented on the below pages:

  1. .Net Core
  2. C# Core
  3. .Net FxCop
  4. C# StyleCop
  5. .Net Gendarme
  6. .Net Gallio
  7. .Net NDeps

FAQ and Troubleshooting

To Go Further...

Roadmap

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

Change Log

Release 2.1 (40 issues)
Type Key Summary Priority
Bug SONARDOTNT-301 sonar-dotnet-gallio-plugin can not parse the new OpenCover reports Major
Bug SONARDOTNT-304 Handle dotCover Exit Codes in the Case of Test Failures Major
Bug SONARDOTNT-280 NPE exceptions are raised when bad file patterns are used Major
Improvement SONARDOTNT-56 Improve Ndeps support for sonar.dotnet.assemblies Major
Bug SONARDOTNT-18 FxCop crash when assemblies are located on another drive Major
Bug SONARDOTNT-295 Wildcard file patterns do not support drive prefixs Major
Improvement SONARDOTNT-296 Update embedded NDeps version Major
New Feature SONARDOTNT-27 Support for design metrics Major
Improvement SONARDOTNT-297 Display the dependency tab Major
Improvement SONARDOTNT-312 Update all the plugins to make them available in the Update Center Major
Improvement SONARDOTNT-328 Improve code coverage metrics Major
Task SONARDOTNT-321 Upgrade to SSLR 1.18 Major
Improvement SONARDOTNT-322 Toolkit: Add the ability to choose the file's charset Major
Improvement SONARDOTNT-271 Support nullable types in ternary condition Major
Improvement SONARDOTNT-308 Add support for C# 5 Major
New Feature SONARDOTNT-319 New rule: Magic number Major
New Feature SONARDOTNT-314 New rule: coupling between objects Major
New Feature SONARDOTNT-320 New rule: 'break' should not be used outside of 'switch' Major
New Feature SONARDOTNT-330 New rule: 'async' and 'await' should not be used as identifiers Major
Improvement SONARDOTNT-268 Do not consider code snippets as commented-out code in method documentation comments Major
New Feature SONARDOTNT-326 Rule S00104: Avoid file with too many lines of code Major
New Feature SONARDOTNT-306 New rule: Avoid too complex function Major
New Feature SONARDOTNT-327 Rule S00105: Avoid use of tabulation character Major
New Feature SONARDOTNT-325 Rule S00103: Avoid too long lines Major
New Feature SONARDOTNT-267 Rule: Avoid a given keyword in comments Major
New Feature SONARDOTNT-315 New rule: Avoid inner assignment Major
New Feature SONARDOTNT-318 New rule: Missing switch default Major
New Feature SONARDOTNT-316 New rule: Avoid reassigning parameters Major
New Feature SONARDOTNT-323 Rule S00100 : Method name must comply with a naming convention Major
New Feature SONARDOTNT-324 Rule S00101 : Class name must comply with a naming convention Major
Bug SONARDOTNT-299 VisualStudioProject.java - Can pick wrong build configuration Major
Bug SONARDOTNT-289 c# dotnet.api.microsoft.ModelFactory does not fail if assemblyname is not defined in project file Major
Improvement SONARDOTNT-298 Use plugin properties instead of XML files to store new rule definitions Major
Task SONARDOTNT-285 Update Sqale model Major
Improvement SONARDOTNT-329 Improve parser (C# 5.0) Support asynchronous methods Major
Improvement SONARDOTNT-292 Add support for Silverlight 5 Major
Improvement SONARDOTNT-307 Add support for .NET 4.5 Major
Bug SONARDOTNT-335 Dependencies on skipped modules raise exceptions Major
Improvement SONARDOTNT-251 When assemblies are compiled in Release, confusing error message 'GallioException: No test assembly was found' Minor
Task SONARDOTNT-313 Update project sample configuration file Minor

 

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