Skip to content

Commit

Permalink
Change version to 2.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
josefpihrt committed May 12, 2019
1 parent 1b6f637 commit e445a1b
Show file tree
Hide file tree
Showing 49 changed files with 399 additions and 161 deletions.
13 changes: 13 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
### 2.1.1 (2019-05-13)

#### Analyzers

* Add analyzer [OptimizeMethodCall](http://github.com/JosefPihrt/Roslynator/blob/master/docs/analyzers/RCS1235.md) (RCS1235).
* Incorporate RCS1150 and RCS1178 into RCS1235.
* Enable by default analyzer [FormatEmptyBlock](http://github.com/JosefPihrt/Roslynator/blob/master/docs/analyzers/RCS1023.md) (RCS1023) and change default severity to 'Hidden'.
* Change default severity of analyzer [ParameterNameDiffersFromBaseName](http://github.com/JosefPihrt/Roslynator/blob/master/docs/analyzers/RCS1168.md) (RCS1168) to 'Hidden'.

#### Refactorings

* Add refactoring [DuplicateSwitchSection](http://github.com/JosefPihrt/Roslynator/blob/master/docs/refactorings/RR0214.md) (RR0214)

### 2.1.0 (2019-03-25)

* Export/import Visual Studio options.
Expand Down
6 changes: 3 additions & 3 deletions docs/analyzers/RCS1023.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@
| -------- | ---------- |
| Id | RCS1023 |
| Category | Formatting |
| Severity | None |
| Severity | Hidden |

## Example

### Code with Diagnostic

```csharp
public void Foo()
void Foo()
{ } // RCS1023
```

### Code with Fix

```csharp
public void Foo()
void Foo()
{
}
```
Expand Down
4 changes: 2 additions & 2 deletions docs/analyzers/RCS1024.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
### Code with Diagnostic

```csharp
public string Foo { get { return _foo; } set { _foo = value; } } // RCS1024
string Foo { get { return _foo; } set { _foo = value; } } // RCS1024
```

### Code with Fix

```csharp
public string Foo
string Foo
{
get { return _foo; }
set { _foo = value; }
Expand Down
4 changes: 2 additions & 2 deletions docs/analyzers/RCS1025.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
### Code with Diagnostic

```csharp
public enum Foo { A, B, C, } // RCS1025
enum Foo { A, B, C, } // RCS1025
```

### Code with Fix

```csharp
public enum Foo
enum Foo
{
A,
B,
Expand Down
6 changes: 3 additions & 3 deletions docs/analyzers/RCS1026.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
### Code with Diagnostic

```csharp
string s = ""; Foo(s); // RCS1026
Foo(); Bar(); // RCS1026
```

### Code with Fix

```csharp
string s = "";
Foo(s);
Foo();
Bar();
```

## See Also
Expand Down
4 changes: 2 additions & 2 deletions docs/analyzers/RCS1027.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
### Code with Diagnostic

```csharp
if (condition) Foo(); // RCS1027
if (x) Foo(); // RCS1027
```

### Code with Fix

```csharp
if (condition)
if (x)
{
Foo();
}
Expand Down
4 changes: 2 additions & 2 deletions docs/analyzers/RCS1028.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
### Code with Diagnostic

```csharp
switch (s)
switch (x)
{
case "a": return Foo(); // RCS1028
case "b": return Bar();
Expand All @@ -21,7 +21,7 @@ switch (s)
### Code with Fix

```csharp
switch (s)
switch (x)
{
case "a":
return Foo();
Expand Down
2 changes: 0 additions & 2 deletions docs/analyzers/RCS1029.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ if (x && // RCS1029
y &&
z)
{

}
```

Expand All @@ -26,7 +25,6 @@ if (x
&& y
&& z)
{

}
```

Expand Down
6 changes: 2 additions & 4 deletions docs/analyzers/RCS1030.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
```csharp
if (x)
Foo(); // RCS1030
if (y)
Bar();
Bar();
```

### Code with Fix
Expand All @@ -23,8 +22,7 @@ if (y)
if (x)
Foo();

if (y)
Bar();
Bar();
```

## See Also
Expand Down
28 changes: 14 additions & 14 deletions docs/analyzers/RCS1057.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,25 @@
### Code with Diagnostic

```csharp
public class Foo
class Foo
{
public void M1()
void M1()
{
} // RCS1057
public void M2()
void M2()
{
} // RCS1057
/// <summary>
/// ...
/// </summary>
public void M3()
void M3()
{
} // RCS1057
public string P1 { get; set; } // RCS1057
string P1 { get; set; } // RCS1057
[Obsolete]
public string P2 { get; set; }
string P2 { get; set; }
} // RCS1057
public enum FooEnum
enum Bar
{
A = 0, // RCS1057
/// <summary>
Expand All @@ -44,30 +44,30 @@ public enum FooEnum
### Code with Fix

```csharp
public class Foo
class Foo
{
public void M1()
void M1()
{
}

public void M2()
void M2()
{
}

/// <summary>
/// ...
/// </summary>
public void M3()
void M3()
{
}

public string P1 { get; set; }
string P1 { get; set; }

[Obsolete]
public string P2 { get; set; }
string P2 { get; set; }
}

public enum FooEnum
enum Bar
{
A = 0,

Expand Down
4 changes: 2 additions & 2 deletions docs/analyzers/RCS1076.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
### Code with Diagnostic

```csharp
public interface IFoo
interface IFoo
{ } // RCS1076
```

### Code with Fix

```csharp
public interface IFoo
interface IFoo
{
}
```
Expand Down
4 changes: 2 additions & 2 deletions docs/analyzers/RCS1092.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
do
{
Foo(); // RCS1092
} while (condition);
} while (x);
```

### Code with Fix
Expand All @@ -24,7 +24,7 @@ do
{
Foo();

} while (condition);
} while (x);
```

## See Also
Expand Down
26 changes: 26 additions & 0 deletions docs/analyzers/RCS1134.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,32 @@

### Code with Diagnostic

```csharp
if (x)
{
// ...
return false; // RCS1134
}

return false;
```

### Code with Fix

```csharp
if (x)
{
// ...
}

return false;
```

- - -

### Code with Diagnostic

```csharp
public void Foo()
{
Expand Down
2 changes: 1 addition & 1 deletion docs/analyzers/RCS1150.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RCS1150: Call string\.Concat instead of string\.Join
# \[deprecated\] RCS1150: Call string\.Concat instead of string\.Join

| Property | Value |
| -------- | -------------- |
Expand Down
20 changes: 8 additions & 12 deletions docs/analyzers/RCS1153.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,20 @@
### Code with Diagnostic

```csharp
if (x)
{
} // RCS1153
if (y)
{
}
if (x)
{
} // RCS1153
Foo();
```

### Code with Fix

```csharp
if (x)
{
}
if (x)
{
}

if (y)
{
}
Foo();
```

## See Also
Expand Down
16 changes: 12 additions & 4 deletions docs/analyzers/RCS1168.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
| -------- | --------------- |
| Id | RCS1168 |
| Category | Maintainability |
| Severity | Warning |
| Severity | Hidden |

## Example

### Code with Diagnostic

```csharp
public interface IFoo
interface IFoo
{
string Bar(object parameter);
}

public abstract class Foo : IFoo
abstract class Foo : IFoo
{
public abstract string Bar(object value); // RCS1168
}
Expand All @@ -25,7 +25,15 @@ public abstract class Foo : IFoo
### Code with Fix

```csharp
public abstract string Bar(object parameter);
interface IFoo
{
string Bar(object parameter);
}

abstract class Foo : IFoo
{
public abstract string Bar(object parameter)
};
```

## See Also
Expand Down
2 changes: 1 addition & 1 deletion docs/analyzers/RCS1178.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RCS1178: Call Debug\.Fail instead of Debug\.Assert
# \[deprecated\] RCS1178: Call Debug\.Fail instead of Debug\.Assert

| Property | Value |
| -------- | ------- |
Expand Down
2 changes: 1 addition & 1 deletion docs/analyzers/RCS1181.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RCS1181: Replace comment with documentation comment
# RCS1181: Convert comment to documentation comment

| Property | Value |
| -------- | ------- |
Expand Down
Loading

0 comments on commit e445a1b

Please sign in to comment.