Skip to content

Commit

Permalink
Analyzers some variable names corrected (#862)
Browse files Browse the repository at this point in the history
* Update Analyzers.xml
* Analyzers some variable names corrected
  • Loading branch information
onexey authored Mar 13, 2022
1 parent eb45763 commit a61fb2a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions docs/analyzers/RCS1077.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ object x = stack.First(); // RCS1077
```csharp
var stack = new Stack<object>();
// ...
object x = items.Peek();
object x = stack.Peek();
```

- - -
Expand All @@ -164,15 +164,15 @@ object x = items.Peek();
```csharp
var queue = new Queue<object>();
// ...
object x = stack.First(); // RCS1077
object x = queue.First(); // RCS1077
```

### Code with Fix

```csharp
var queue = new Queue<object>();
// ...
object x = items.Peek();
object x = queue.Peek();
```

- - -
Expand Down
6 changes: 3 additions & 3 deletions src/Analyzers/Analyzers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1859,15 +1859,15 @@ catch (Exception ex) // [|Id|]
object x = stack.First(); // [|Id|]]]></Before>
<After><![CDATA[var stack = new Stack<object>();
// ...
object x = items.Peek();]]></After>
object x = stack.Peek();]]></After>
</Sample>
<Sample>
<Before><![CDATA[var queue = new Queue<object>();
// ...
object x = stack.First(); // [|Id|]]]></Before>
object x = queue.First(); // [|Id|]]]></Before>
<After><![CDATA[var queue = new Queue<object>();
// ...
object x = items.Peek();]]></After>
object x = queue.Peek();]]></After>
</Sample>
<Sample>
<Before><![CDATA[enumerable.Any() ? enumerable.First() : default]]></Before>
Expand Down

0 comments on commit a61fb2a

Please sign in to comment.