Skip to content

Commit 9dc014b

Browse files
committed
Change version to 3.0.1
1 parent 26db87b commit 9dc014b

File tree

85 files changed

+1672
-307
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+1672
-307
lines changed

ChangeLog.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
1+
### 3.0.1 (2020-10-19)
2+
3+
* Add analyzer [RCS0055](https://github.com/JosefPihrt/Roslynator/blob/master/docs/analyzers/RCS0055.md) (Fix formatting of a binary expression chain)
4+
* Add analyzer [RCS0054](https://github.com/JosefPihrt/Roslynator/blob/master/docs/analyzers/RCS0054.md) (Fix formatting of a call chain)
5+
* Add analyzer [RCS0053](https://github.com/JosefPihrt/Roslynator/blob/master/docs/analyzers/RCS0053.md) (Fix formatting of a list)
6+
* Add analyzer [RCS0052](https://github.com/JosefPihrt/Roslynator/blob/master/docs/analyzers/RCS0052.md) (Add newline before equals sign instead of after it (or vice versa))
7+
* Add analyzer [RCS1248](https://github.com/JosefPihrt/Roslynator/blob/master/docs/analyzers/RCS1248.md) (Use 'is null' pattern instead of comparison (or vice versa)) ([issue](https://github.com/JosefPihrt/Roslynator/issues/458))
8+
* Add analyzer [RCS1247](https://github.com/JosefPihrt/Roslynator/blob/master/docs/analyzers/RCS1247.md) (Fix documentation comment tag)
9+
* Add analyzer option [RCS1207i](https://github.com/JosefPihrt/Roslynator/blob/master/docs/analyzers/RCS1207i.md) (Convert method group to anonymous function)
10+
* Add analyzer option [RCS1090i](https://github.com/JosefPihrt/Roslynator/blob/master/docs/analyzers/RCS1090i.md) (Remove call to 'ConfigureAwait')
11+
* Add analyzer option [RCS1018i](https://github.com/JosefPihrt/Roslynator/blob/master/docs/analyzers/RCS1018i.md) (Remove accessibility modifiers) ([issue](https://github.com/JosefPihrt/Roslynator/issues/260))
12+
* Add analyzer option [RCS1014i](https://github.com/JosefPihrt/Roslynator/blob/master/docs/analyzers/RCS1014i.md) (Use implicitly typed array)
13+
* Add analyzer option [RCS1014a](https://github.com/JosefPihrt/Roslynator/blob/master/docs/analyzers/RCS1014a.md) (Use implicitly typed array (when type is obvious))
14+
* Add analyzer option [RCS1078i](https://github.com/JosefPihrt/Roslynator/blob/master/docs/analyzers/RCS1078i.md) (Use string.Empty instead of "")
15+
* Add analyzer option [RCS1016a](https://github.com/JosefPihrt/Roslynator/blob/master/docs/analyzers/RCS1016a.md) (Convert expression-body to block body when expression is multi-line)
16+
* Add analyzer option [RCS1016b](https://github.com/JosefPihrt/Roslynator/blob/master/docs/analyzers/RCS1016b.md) (Convert expression-body to block body when declaration is multi-line)
17+
* Disable by default analyzer [RCS1207i](https://github.com/JosefPihrt/Roslynator/blob/master/docs/analyzers/RCS1207i.md) (Convert method group to anonymous function)
18+
* Remove analyzer [RCS1219](https://github.com/JosefPihrt/Roslynator/blob/master/docs/analyzers/RCS1219.md) (Call 'Enumerable.Skip' and 'Enumerable.Any' instead of 'Enumerable.Count')
19+
* Rename analyzer "Avoid 'null' on left side of binary expression" to "Constant values should be placed on right side of comparisons" [RCS1098](https://github.com/JosefPihrt/Roslynator/blob/master/docs/analyzers/RCS1098.md)
20+
* Rename analyzer "Simplify boolean expression" to "Unncessary null check" [RCS1199](https://github.com/JosefPihrt/Roslynator/blob/master/docs/analyzers/RCS1199.md) ([issue](https://github.com/JosefPihrt/Roslynator/issues/373))
21+
22+
* More syntax is considered as having obvious type:
23+
* string literal
24+
* character literal
25+
* boolean literal
26+
* implicit array creation that contains only expressions whose type is obvious
27+
128
### 3.0.0 (2020-06-16)
229

330
* Update references to Roslyn API to 3.5.0

docs/analyzers/RCS0047.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
# RCS0047: Wrap and indent each node in list
1+
# RCS0047: \[deprecated\] Wrap and indent each node in list
22

33
| Property | Value |
44
| -------- | ---------- |
55
| Id | RCS0047 |
66
| Category | Formatting |
77
| Severity | None |
88

9+
## Summary
10+
11+
This analyzer has been deprecated. Use analyzer [RCS0053](RCS0053.md) instead.
12+
913
## Examples
1014

1115
### Code with Diagnostic

docs/analyzers/RCS0052.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# RCS0052: Add newline before equals sign instead of after it \(or vice versa\)
2+
3+
| Property | Value |
4+
| -------- | ---------- |
5+
| Id | RCS0052 |
6+
| Category | Formatting |
7+
| Severity | None |
8+
9+
## Example
10+
11+
### Code with Diagnostic
12+
13+
```csharp
14+
string s = // RCS0052
15+
new string(' ', 4);
16+
```
17+
18+
### Code with Fix
19+
20+
```csharp
21+
string s
22+
= new string(' ', 4);
23+
```
24+
25+
## Options
26+
27+
* [RCS0052i](RCS0052i.md) \- Add newline after equals sign instead of before it\.
28+
29+
## Applies to
30+
31+
* [Roslynator.Formatting.Analyzers](https://www.nuget.org/packages/Roslynator.Formatting.Analyzers)
32+
33+
## See Also
34+
35+
* [Analyzer Options](../AnalyzerOptions.md)
36+
* [How to Suppress a Diagnostic](../HowToConfigureAnalyzers.md#how-to-suppress-a-diagnostic)
37+
38+
39+
*\(Generated with [DotMarkdown](http://github.com/JosefPihrt/DotMarkdown)\)*

docs/analyzers/RCS0052i.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# RCS0052i: Add newline after equals sign instead of before it
2+
3+
| Property | Value |
4+
| -------- | -------------- |
5+
| Id | RCS0052i |
6+
| Category | AnalyzerOption |
7+
| Severity | None |
8+
9+
This option modifies behavior of analyzer [RCS0052](RCS0052.md)\. It requires [RCS0052](RCS0052.md) to be enabled\.
10+
11+
## Example
12+
13+
### Code with Diagnostic
14+
15+
```csharp
16+
string s // [|Id|]
17+
= new string(' ', 4);
18+
```
19+
20+
### Code with Fix
21+
22+
```csharp
23+
string s =
24+
new string(' ', 4);
25+
```
26+
27+
## Applies to
28+
29+
* [Roslynator.Formatting.Analyzers](https://www.nuget.org/packages/Roslynator.Formatting.Analyzers)
30+
31+
## See Also
32+
33+
* [Analyzer Options](../AnalyzerOptions.md)
34+
* [How to Suppress a Diagnostic](../HowToConfigureAnalyzers.md#how-to-suppress-a-diagnostic)
35+
36+
37+
*\(Generated with [DotMarkdown](http://github.com/JosefPihrt/DotMarkdown)\)*

docs/analyzers/RCS0053.md

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
# RCS0053: Fix formatting of a list
2+
3+
| Property | Value |
4+
| -------- | ---------- |
5+
| Id | RCS0053 |
6+
| Category | Formatting |
7+
| Severity | None |
8+
9+
## Summary
10+
11+
12+
This analyzer:
13+
* fixes indentation of argument/parameter list and similar lists
14+
* formats each item in a multi-line list on a separate line
15+
16+
Following formats are considered as valid (for a parameter list):
17+
```cs
18+
void M(object x, object y)
19+
{
20+
}
21+
```
22+
```cs
23+
void M(
24+
object x, object y)
25+
{
26+
}
27+
```
28+
```cs
29+
void M(
30+
object x,
31+
object y)
32+
{
33+
}
34+
```
35+
36+
37+
## Examples
38+
39+
### Code with Diagnostic
40+
41+
```csharp
42+
void M(
43+
object x,
44+
object y)
45+
{
46+
}
47+
```
48+
49+
### Code with Fix
50+
51+
```csharp
52+
void M(
53+
object x,
54+
object y)
55+
{
56+
}
57+
```
58+
59+
- - -
60+
61+
### Code with Diagnostic
62+
63+
```csharp
64+
void M(object x,
65+
object y)
66+
{
67+
}
68+
```
69+
70+
### Code with Fix
71+
72+
```csharp
73+
void M(
74+
object x,
75+
object y)
76+
{
77+
}
78+
```
79+
80+
- - -
81+
82+
### Code with Diagnostic
83+
84+
```csharp
85+
void M(object x,
86+
object y)
87+
{
88+
}
89+
```
90+
91+
### Code with Fix
92+
93+
```csharp
94+
void M(
95+
object x,
96+
object y)
97+
{
98+
}
99+
```
100+
101+
- - -
102+
103+
### Code with Diagnostic
104+
105+
```csharp
106+
void M(
107+
object x,
108+
object y, object z)
109+
{
110+
}
111+
```
112+
113+
### Code with Fix
114+
115+
```csharp
116+
void M(
117+
object x,
118+
object y,
119+
object z)
120+
{
121+
}
122+
```
123+
124+
## Applies to
125+
126+
* [Roslynator.Formatting.Analyzers](https://www.nuget.org/packages/Roslynator.Formatting.Analyzers)
127+
128+
## See Also
129+
130+
* [How to Suppress a Diagnostic](../HowToConfigureAnalyzers.md#how-to-suppress-a-diagnostic)
131+
132+
133+
*\(Generated with [DotMarkdown](http://github.com/JosefPihrt/DotMarkdown)\)*

docs/analyzers/RCS0054.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# RCS0054: Fix formatting of a call chain
2+
3+
| Property | Value |
4+
| -------- | ---------- |
5+
| Id | RCS0054 |
6+
| Category | Formatting |
7+
| Severity | None |
8+
9+
## Summary
10+
11+
This analyzer:
12+
* fixes indentation of multi-line call chain
13+
* formats each call on a separate line
14+
15+
16+
## Examples
17+
18+
### Code with Diagnostic
19+
20+
```csharp
21+
return [|x.M1() // RCS0054
22+
.M2().M3()|];
23+
```
24+
25+
### Code with Fix
26+
27+
```csharp
28+
return [|x.M1()
29+
.M2()
30+
.M3()|];
31+
```
32+
33+
- - -
34+
35+
### Code with Diagnostic
36+
37+
```csharp
38+
return [|x.M1() // RCS0054
39+
.M2()
40+
.M3()|];
41+
```
42+
43+
### Code with Fix
44+
45+
```csharp
46+
return [|x.M1()
47+
.M2()
48+
.M3()|];
49+
```
50+
51+
## Applies to
52+
53+
* [Roslynator.Formatting.Analyzers](https://www.nuget.org/packages/Roslynator.Formatting.Analyzers)
54+
55+
## See Also
56+
57+
* [How to Suppress a Diagnostic](../HowToConfigureAnalyzers.md#how-to-suppress-a-diagnostic)
58+
59+
60+
*\(Generated with [DotMarkdown](http://github.com/JosefPihrt/DotMarkdown)\)*

docs/analyzers/RCS0055.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# RCS0055: Fix formatting of a binary expression chain
2+
3+
| Property | Value |
4+
| -------- | ---------- |
5+
| Id | RCS0055 |
6+
| Category | Formatting |
7+
| Severity | None |
8+
9+
## Summary
10+
11+
This analyzer:
12+
* fixes indentation of multi-line binary expression chain
13+
* formats each expression on a separate line
14+
15+
16+
## Examples
17+
18+
### Code with Diagnostic
19+
20+
```csharp
21+
if (x && y // RCS0055
22+
&& z)
23+
{
24+
}
25+
```
26+
27+
### Code with Fix
28+
29+
```csharp
30+
if (x
31+
&& y
32+
&& z)
33+
{
34+
}
35+
```
36+
37+
- - -
38+
39+
### Code with Diagnostic
40+
41+
```csharp
42+
if (x // RCS0055
43+
&& y
44+
&& z)
45+
{
46+
}
47+
```
48+
49+
### Code with Fix
50+
51+
```csharp
52+
if (x
53+
&& y
54+
&& z)
55+
{
56+
}
57+
```
58+
59+
## Applies to
60+
61+
* [Roslynator.Formatting.Analyzers](https://www.nuget.org/packages/Roslynator.Formatting.Analyzers)
62+
63+
## See Also
64+
65+
* [How to Suppress a Diagnostic](../HowToConfigureAnalyzers.md#how-to-suppress-a-diagnostic)
66+
67+
68+
*\(Generated with [DotMarkdown](http://github.com/JosefPihrt/DotMarkdown)\)*

0 commit comments

Comments
 (0)