From 6c209d404ec39063349f37f0106a0323802e7691 Mon Sep 17 00:00:00 2001 From: Andrei Epure <38876598+andrei-epure-sonarsource@users.noreply.github.com> Date: Fri, 21 Jun 2019 10:40:43 +0300 Subject: [PATCH] Update dotnet analyzers documentation (#1758) * Add links to dotnet scanners * Analyze generated code instructions * Give example of code gen tools --- server/sonar-docs/src/pages/analysis/languages/csharp.md | 6 ++++++ server/sonar-docs/src/pages/analysis/languages/vb.md | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/server/sonar-docs/src/pages/analysis/languages/csharp.md b/server/sonar-docs/src/pages/analysis/languages/csharp.md index 0d8ecf65b8e..589f497c2a0 100644 --- a/server/sonar-docs/src/pages/analysis/languages/csharp.md +++ b/server/sonar-docs/src/pages/analysis/languages/csharp.md @@ -13,6 +13,12 @@ url: /analysis/languages/csharp/ Discover and update the C#-specific [properties](/analysis/analysis-parameters/) in: Project **[Administration > General Settings > C#](/#sonarqube-admin#/admin/settings?category=c%23)**. +### Analyze Generated Code + +To analyze tool-generated code (e.g. WCF code generated by `SvcUtil.exe`, protobuf code generated by `protoc`, Swagger client code generated by `NSwag`) for a specific C# project, enable the "Analyze generated code" setting inside **Project > Administration > General Settings > C#**. By default, tool-generated code files are skipped from analysis. + ## Related Pages * [Excluding External Roslyn Issues](/analysis/external-issues/) (See "Notes on external .NET issues") * [Test Coverage & Execution](/analysis/coverage/) (Visual Studio Code Coverage, dotCover, OpenCover) +* [SonarScanner for MSBuild](/analysis/scan/sonarscanner-for-msbuild/) +* [SonarScanner for Azure DevOps](/analysis/scan/sonarscanner-for-azure-devops/) diff --git a/server/sonar-docs/src/pages/analysis/languages/vb.md b/server/sonar-docs/src/pages/analysis/languages/vb.md index 40d52549451..d636dff9c84 100644 --- a/server/sonar-docs/src/pages/analysis/languages/vb.md +++ b/server/sonar-docs/src/pages/analysis/languages/vb.md @@ -13,6 +13,10 @@ url: /analysis/languages/vb/ Discover and update the VB.NET-specific [properties](/analysis/analysis-parameters/) in: Project **[Administration > General Settings > VB.NET](/#sonarqube-admin#/admin/settings?category=vb.net)** +### Analyze Generated Code + +To analyze tool-generated code (e.g. WCF code generated by `SvcUtil.exe`) for a specific VB.NET project, enable the "Analyze generated code" setting inside **Project > Administration > General Settings > VB.NET**. By default, tool-generated code files are skipped from analysis. + ## Known Limitations Currently an error will be thrown when an issue is raised on a line of code containing the following pattern `\s+error\s*:` (i.e. one or more spaces, the string 'error', zero or more spaces and a ':' ) . This is a well known problem on the Microsoft side (see [issue](https://github.com/dotnet/roslyn/issues/5724/)). In order to work around this problem, our analyzer will skip issues reported on any line where the pattern is detected. @@ -20,3 +24,5 @@ Currently an error will be thrown when an issue is raised on a line of code cont ## Related Pages * [Importing External Issues](/analysis/external-issues/) (VSTest, NUnit, MSTest, xUnit) * [Test Coverage & Execution](/analysis/coverage/) (Visual Studio Code Coverage, dotCover, OpenCover, NCover 3) +* [SonarScanner for MSBuild](/analysis/scan/sonarscanner-for-msbuild/) +* [SonarScanner for Azure DevOps](/analysis/scan/sonarscanner-for-azure-devops/) -- 2.39.5