-
-
Notifications
You must be signed in to change notification settings - Fork 260
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2e74ae4
commit 520d106
Showing
43 changed files
with
501 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# RCS1220: Use pattern matching instead of combination of 'is' operator and cast operator | ||
|
||
| Property | Value | | ||
| --------------------------- | -------- | | ||
| Id | RCS1220 | | ||
| Category | Usage | | ||
| Default Severity | Info | | ||
| Enabled by Default | ✓ | | ||
| Supports Fade\-Out | \- | | ||
| Supports Fade\-Out Analyzer | \- | | ||
|
||
## Example | ||
|
||
### Code with Diagnostic | ||
|
||
```csharp | ||
if (x is T && Foo((T)x)) // RCS1220 | ||
{ | ||
} | ||
``` | ||
|
||
### Code with Fix | ||
|
||
```csharp | ||
if (x is T y && Foo(y)) | ||
{ | ||
} | ||
``` | ||
|
||
## How to Suppress | ||
|
||
### SuppressMessageAttribute | ||
|
||
```csharp | ||
[assembly: SuppressMessage("Usage", "RCS1220:Use pattern matching instead of combination of 'is' operator and cast operator.", Justification = "<Pending>")] | ||
``` | ||
|
||
### \#pragma | ||
|
||
```csharp | ||
#pragma warning disable RCS1220 // Use pattern matching instead of combination of 'is' operator and cast operator. | ||
#pragma warning restore RCS1220 // Use pattern matching instead of combination of 'is' operator and cast operator. | ||
``` | ||
|
||
### Ruleset | ||
|
||
* [How to configure rule set](../HowToConfigureAnalyzers.md) | ||
|
||
*\(Generated with [DotMarkdown](http://github.com/JosefPihrt/DotMarkdown)\)* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# RCS1221: Use pattern matching instead of combination of 'as' operator and null check | ||
|
||
| Property | Value | | ||
| --------------------------- | -------- | | ||
| Id | RCS1221 | | ||
| Category | Usage | | ||
| Default Severity | Info | | ||
| Enabled by Default | ✓ | | ||
| Supports Fade\-Out | \- | | ||
| Supports Fade\-Out Analyzer | \- | | ||
|
||
## Example | ||
|
||
### Code with Diagnostic | ||
|
||
```csharp | ||
var y = x as Foo; // RCS1221 | ||
if (y == null) | ||
{ | ||
return; | ||
} | ||
``` | ||
|
||
### Code with Fix | ||
|
||
```csharp | ||
if (!(x is Foo y)) | ||
{ | ||
return; | ||
} | ||
``` | ||
|
||
## How to Suppress | ||
|
||
### SuppressMessageAttribute | ||
|
||
```csharp | ||
[assembly: SuppressMessage("Usage", "RCS1221:Use pattern matching instead of combination of 'as' operator and null check.", Justification = "<Pending>")] | ||
``` | ||
|
||
### \#pragma | ||
|
||
```csharp | ||
#pragma warning disable RCS1221 // Use pattern matching instead of combination of 'as' operator and null check. | ||
#pragma warning restore RCS1221 // Use pattern matching instead of combination of 'as' operator and null check. | ||
``` | ||
|
||
### Ruleset | ||
|
||
* [How to configure rule set](../HowToConfigureAnalyzers.md) | ||
|
||
*\(Generated with [DotMarkdown](http://github.com/JosefPihrt/DotMarkdown)\)* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# RCS1222: Merge preprocessor directives | ||
|
||
| Property | Value | | ||
| --------------------------- | ----------- | | ||
| Id | RCS1222 | | ||
| Category | Readability | | ||
| Default Severity | Info | | ||
| Enabled by Default | ✓ | | ||
| Supports Fade\-Out | \- | | ||
| Supports Fade\-Out Analyzer | \- | | ||
|
||
## Example | ||
|
||
### Code with Diagnostic | ||
|
||
```csharp | ||
#pragma warning disable CS0000 | ||
#pragma warning disable CS0001 | ||
``` | ||
|
||
### Code with Fix | ||
|
||
```csharp | ||
#pragma warning disable CS0000, CS0001 | ||
``` | ||
|
||
## How to Suppress | ||
|
||
### SuppressMessageAttribute | ||
|
||
```csharp | ||
[assembly: SuppressMessage("Readability", "RCS1222:Merge preprocessor directives.", Justification = "<Pending>")] | ||
``` | ||
|
||
### \#pragma | ||
|
||
```csharp | ||
#pragma warning disable RCS1222 // Merge preprocessor directives. | ||
#pragma warning restore RCS1222 // Merge preprocessor directives. | ||
``` | ||
|
||
### Ruleset | ||
|
||
* [How to configure rule set](../HowToConfigureAnalyzers.md) | ||
|
||
*\(Generated with [DotMarkdown](http://github.com/JosefPihrt/DotMarkdown)\)* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# CS1003 | ||
|
||
| Property | Value | | ||
| ---------------------- | ----------------------------------------------------------------- | | ||
| Id | CS1003 | | ||
| Title | Syntax error, 'char' expected\. | | ||
| Severity | Error | | ||
| Official Documentation | [link](http://docs.microsoft.com/en-us/dotnet/csharp/misc/cs1003) | | ||
|
||
## Code Fixes | ||
|
||
* Add missing comma | ||
|
||
*\(Generated with [DotMarkdown](http://github.com/JosefPihrt/DotMarkdown)\)* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# CS1624 | ||
|
||
| Property | Value | | ||
| ---------------------- | ------------------------------------------------------------------------------------------------------- | | ||
| Id | CS1624 | | ||
| Title | The body of 'identifier' cannot be an iterator block because 'type' is not an iterator interface type\. | | ||
| Severity | Error | | ||
| Official Documentation | [link](http://docs.microsoft.com/en-us/dotnet/csharp/misc/cs1624) | | ||
|
||
## Code Fixes | ||
|
||
* Change method return type | ||
|
||
*\(Generated with [DotMarkdown](http://github.com/JosefPihrt/DotMarkdown)\)* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# CS1983 | ||
|
||
| Property | Value | | ||
| -------- | ------------------------------------------------------------------- | | ||
| Id | CS1983 | | ||
| Title | The return type of an async method must be void, Task or Task\<T>\. | | ||
| Severity | Error | | ||
|
||
## Code Fixes | ||
|
||
* Change method return type | ||
|
||
*\(Generated with [DotMarkdown](http://github.com/JosefPihrt/DotMarkdown)\)* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.