From da92b8925b58b05dc6e4f64f48932a02cc6c0c46 Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Thu, 15 Oct 2015 22:43:02 -0500 Subject: [PATCH 1/2] Remove documented AdditionalFiles workaround This step is now handled automatically by a custom MSBuild target. --- documentation/Configuration.md | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/documentation/Configuration.md b/documentation/Configuration.md index a193cfc2b..1d5157a4e 100644 --- a/documentation/Configuration.md +++ b/documentation/Configuration.md @@ -18,25 +18,6 @@ Code analysis rule sets are the standard way to configure most diagnostic analyz The easiest way to add a **stylecop.json** configuration file to a new project is using a code fix provided by the project. To invoke the code fix, open any file where SA1633 is reported¹ and press Ctrl+. to bring up the Quick Fix menu. From the menu, select **Add StyleCop settings file to the project**. -> :warning: At this time, the code fix is not able to fully configure the newly-created **stylecop.json** file for use. This is tracked in bug report [dotnet/roslyn#4655](https://github.com/dotnet/roslyn/issues/4655). In the mean time, users must manually perform the following additional steps after creating the **stylecop.json** file. -> -> 1. Right click the project in **Solution Explorer** and select **Unload Project**. If you are asked to save changes, click **Yes**. -> 2. Right click the unloaded project in **Solution Explorer** and select **Edit *ProjectName*.csproj**. -> 3. Locate the following item in the project file. - -> ```csharp -> -> ``` - -> 4. Change the definition to the following. - -> ```csharp -> -> ``` - -> 5. Save and close the project file. -> 6. Right click the unloaded project in **Solution Explorer** and select **Reload Project**. - ### JSON Schema for IntelliSense A JSON schema is available for **stylecop.json**. By including a reference in **stylecop.json** to this schema, Visual Studio will offer IntelliSense functionality (code completion, quick info, etc.) while editing this file. The schema may be configured by adding the following top-level property in **stylecop.json**: From 9ef0fbb8ba6c84f59d8483d5539565fc43943072 Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Thu, 15 Oct 2015 22:48:40 -0500 Subject: [PATCH 2/2] Document warning suppressions via rule set files Fixes #1629 --- documentation/SA1652.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/documentation/SA1652.md b/documentation/SA1652.md index 6b3a99110..b0c97201b 100644 --- a/documentation/SA1652.md +++ b/documentation/SA1652.md @@ -34,8 +34,20 @@ errors over time. To fix a violation of this rule, enable the XML documentation file as part of the project output. **Note:** In some cases, enabling XML documentation output will produce a large number of warnings CS1573 and/or CS1591 -to be reported. To improve the ability of teams to resolve SA1652 before CS1573 and/or CS1591, consider editing the -project file to include the following property group. +to be reported. To improve the ability of teams to resolve SA1652 before CS1573 and/or CS1591, consider disabling these +warnings by one of the following methods. + +### Suppression via rule set files + +CS1573 and CS1591 are most easily suppressed by editing the rule set file. The severity of these rules may be set to +**Hidden** or **None** to hide them from the build output. + +### Suppression via the project file + +For users who sometimes build their project with older versions of C# (which do not support rule set files), these +warnings may be suppressed by configuring the `` element in the project file. One easy way to configure both the +documentation output (which corrects SA1652) and the suppressions for CS1573 and CS1591 is to add the following property +group to the project file. ```xml