-
-
Notifications
You must be signed in to change notification settings - Fork 256
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
26db87b
commit 9dc014b
Showing
85 changed files
with
1,672 additions
and
307 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,39 @@ | ||
# RCS0052: Add newline before equals sign instead of after it \(or vice versa\) | ||
|
||
| Property | Value | | ||
| -------- | ---------- | | ||
| Id | RCS0052 | | ||
| Category | Formatting | | ||
| Severity | None | | ||
|
||
## Example | ||
|
||
### Code with Diagnostic | ||
|
||
```csharp | ||
string s = // RCS0052 | ||
new string(' ', 4); | ||
``` | ||
|
||
### Code with Fix | ||
|
||
```csharp | ||
string s | ||
= new string(' ', 4); | ||
``` | ||
|
||
## Options | ||
|
||
* [RCS0052i](RCS0052i.md) \- Add newline after equals sign instead of before it\. | ||
|
||
## Applies to | ||
|
||
* [Roslynator.Formatting.Analyzers](https://www.nuget.org/packages/Roslynator.Formatting.Analyzers) | ||
|
||
## See Also | ||
|
||
* [Analyzer Options](../AnalyzerOptions.md) | ||
* [How to Suppress a Diagnostic](../HowToConfigureAnalyzers.md#how-to-suppress-a-diagnostic) | ||
|
||
|
||
*\(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,37 @@ | ||
# RCS0052i: Add newline after equals sign instead of before it | ||
|
||
| Property | Value | | ||
| -------- | -------------- | | ||
| Id | RCS0052i | | ||
| Category | AnalyzerOption | | ||
| Severity | None | | ||
|
||
This option modifies behavior of analyzer [RCS0052](RCS0052.md)\. It requires [RCS0052](RCS0052.md) to be enabled\. | ||
|
||
## Example | ||
|
||
### Code with Diagnostic | ||
|
||
```csharp | ||
string s // [|Id|] | ||
= new string(' ', 4); | ||
``` | ||
|
||
### Code with Fix | ||
|
||
```csharp | ||
string s = | ||
new string(' ', 4); | ||
``` | ||
|
||
## Applies to | ||
|
||
* [Roslynator.Formatting.Analyzers](https://www.nuget.org/packages/Roslynator.Formatting.Analyzers) | ||
|
||
## See Also | ||
|
||
* [Analyzer Options](../AnalyzerOptions.md) | ||
* [How to Suppress a Diagnostic](../HowToConfigureAnalyzers.md#how-to-suppress-a-diagnostic) | ||
|
||
|
||
*\(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,133 @@ | ||
# RCS0053: Fix formatting of a list | ||
|
||
| Property | Value | | ||
| -------- | ---------- | | ||
| Id | RCS0053 | | ||
| Category | Formatting | | ||
| Severity | None | | ||
|
||
## Summary | ||
|
||
|
||
This analyzer: | ||
* fixes indentation of argument/parameter list and similar lists | ||
* formats each item in a multi-line list on a separate line | ||
|
||
Following formats are considered as valid (for a parameter list): | ||
```cs | ||
void M(object x, object y) | ||
{ | ||
} | ||
``` | ||
```cs | ||
void M( | ||
object x, object y) | ||
{ | ||
} | ||
``` | ||
```cs | ||
void M( | ||
object x, | ||
object y) | ||
{ | ||
} | ||
``` | ||
|
||
|
||
## Examples | ||
|
||
### Code with Diagnostic | ||
|
||
```csharp | ||
void M( | ||
object x, | ||
object y) | ||
{ | ||
} | ||
``` | ||
|
||
### Code with Fix | ||
|
||
```csharp | ||
void M( | ||
object x, | ||
object y) | ||
{ | ||
} | ||
``` | ||
|
||
- - - | ||
|
||
### Code with Diagnostic | ||
|
||
```csharp | ||
void M(object x, | ||
object y) | ||
{ | ||
} | ||
``` | ||
|
||
### Code with Fix | ||
|
||
```csharp | ||
void M( | ||
object x, | ||
object y) | ||
{ | ||
} | ||
``` | ||
|
||
- - - | ||
|
||
### Code with Diagnostic | ||
|
||
```csharp | ||
void M(object x, | ||
object y) | ||
{ | ||
} | ||
``` | ||
|
||
### Code with Fix | ||
|
||
```csharp | ||
void M( | ||
object x, | ||
object y) | ||
{ | ||
} | ||
``` | ||
|
||
- - - | ||
|
||
### Code with Diagnostic | ||
|
||
```csharp | ||
void M( | ||
object x, | ||
object y, object z) | ||
{ | ||
} | ||
``` | ||
|
||
### Code with Fix | ||
|
||
```csharp | ||
void M( | ||
object x, | ||
object y, | ||
object z) | ||
{ | ||
} | ||
``` | ||
|
||
## Applies to | ||
|
||
* [Roslynator.Formatting.Analyzers](https://www.nuget.org/packages/Roslynator.Formatting.Analyzers) | ||
|
||
## See Also | ||
|
||
* [How to Suppress a Diagnostic](../HowToConfigureAnalyzers.md#how-to-suppress-a-diagnostic) | ||
|
||
|
||
*\(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,60 @@ | ||
# RCS0054: Fix formatting of a call chain | ||
|
||
| Property | Value | | ||
| -------- | ---------- | | ||
| Id | RCS0054 | | ||
| Category | Formatting | | ||
| Severity | None | | ||
|
||
## Summary | ||
|
||
This analyzer: | ||
* fixes indentation of multi-line call chain | ||
* formats each call on a separate line | ||
|
||
|
||
## Examples | ||
|
||
### Code with Diagnostic | ||
|
||
```csharp | ||
return [|x.M1() // RCS0054 | ||
.M2().M3()|]; | ||
``` | ||
|
||
### Code with Fix | ||
|
||
```csharp | ||
return [|x.M1() | ||
.M2() | ||
.M3()|]; | ||
``` | ||
|
||
- - - | ||
|
||
### Code with Diagnostic | ||
|
||
```csharp | ||
return [|x.M1() // RCS0054 | ||
.M2() | ||
.M3()|]; | ||
``` | ||
|
||
### Code with Fix | ||
|
||
```csharp | ||
return [|x.M1() | ||
.M2() | ||
.M3()|]; | ||
``` | ||
|
||
## Applies to | ||
|
||
* [Roslynator.Formatting.Analyzers](https://www.nuget.org/packages/Roslynator.Formatting.Analyzers) | ||
|
||
## See Also | ||
|
||
* [How to Suppress a Diagnostic](../HowToConfigureAnalyzers.md#how-to-suppress-a-diagnostic) | ||
|
||
|
||
*\(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,68 @@ | ||
# RCS0055: Fix formatting of a binary expression chain | ||
|
||
| Property | Value | | ||
| -------- | ---------- | | ||
| Id | RCS0055 | | ||
| Category | Formatting | | ||
| Severity | None | | ||
|
||
## Summary | ||
|
||
This analyzer: | ||
* fixes indentation of multi-line binary expression chain | ||
* formats each expression on a separate line | ||
|
||
|
||
## Examples | ||
|
||
### Code with Diagnostic | ||
|
||
```csharp | ||
if (x && y // RCS0055 | ||
&& z) | ||
{ | ||
} | ||
``` | ||
|
||
### Code with Fix | ||
|
||
```csharp | ||
if (x | ||
&& y | ||
&& z) | ||
{ | ||
} | ||
``` | ||
|
||
- - - | ||
|
||
### Code with Diagnostic | ||
|
||
```csharp | ||
if (x // RCS0055 | ||
&& y | ||
&& z) | ||
{ | ||
} | ||
``` | ||
|
||
### Code with Fix | ||
|
||
```csharp | ||
if (x | ||
&& y | ||
&& z) | ||
{ | ||
} | ||
``` | ||
|
||
## Applies to | ||
|
||
* [Roslynator.Formatting.Analyzers](https://www.nuget.org/packages/Roslynator.Formatting.Analyzers) | ||
|
||
## See Also | ||
|
||
* [How to Suppress a Diagnostic](../HowToConfigureAnalyzers.md#how-to-suppress-a-diagnostic) | ||
|
||
|
||
*\(Generated with [DotMarkdown](http://github.com/JosefPihrt/DotMarkdown)\)* |
Oops, something went wrong.