Skip to content

Commit

Permalink
Merge pull request #1636 from sharwell/docs-cleanup
Browse files Browse the repository at this point in the history
Minor documentation cleanup
  • Loading branch information
sharwell committed Oct 16, 2015
2 parents 019ade5 + 9ef0fbb commit ba1c3e2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 21 deletions.
19 changes: 0 additions & 19 deletions documentation/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
> <None Include="stylecop.json" />
> ```
> 4. Change the definition to the following.
> ```csharp
> <AdditionalFiles Include="stylecop.json" />
> ```
> 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**:
Expand Down
16 changes: 14 additions & 2 deletions documentation/SA1652.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<NoWarn>` 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
<PropertyGroup>
Expand Down

0 comments on commit ba1c3e2

Please sign in to comment.