-
Notifications
You must be signed in to change notification settings - Fork 6
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
Showing
38 changed files
with
459 additions
and
143 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
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
14 changes: 14 additions & 0 deletions
14
NetFabric.Hyperlinq.Analyzer.UnitTests/TestData/HLQ010/Diagnostic/ArraySegment.cs
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 @@ | ||
using System; | ||
|
||
namespace HLQ010.NoDiagnostic.ArraySegment | ||
{ | ||
partial class C | ||
{ | ||
void Method() | ||
{ | ||
var source = new ArraySegment<int>(); | ||
foreach (var item in source) | ||
Console.WriteLine(item); | ||
} | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
NetFabric.Hyperlinq.Analyzer.UnitTests/TestData/HLQ010/NoDiagnostic/ImmutableArray.cs
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 @@ | ||
using System; | ||
|
||
namespace HLQ010.NoDiagnostic.ImmutableArray | ||
{ | ||
partial class C | ||
{ | ||
void Method() | ||
{ | ||
var source = System.Collections.Immutable.ImmutableArray.Create(System.Array.Empty<int>()); | ||
foreach (var item in source) | ||
Console.WriteLine(item); | ||
} | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...tTests/TestData/HLQ010/Diagnostic/List.cs → ...ests/TestData/HLQ010/NoDiagnostic/List.cs
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
4 changes: 2 additions & 2 deletions
4
NetFabric.Hyperlinq.Analyzer.UnitTests/TestData/HLQ013/Diagnostic/Array.cs
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
17 changes: 17 additions & 0 deletions
17
NetFabric.Hyperlinq.Analyzer.UnitTests/TestData/HLQ013/Diagnostic/CompoundAssignmentOne.cs
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,17 @@ | ||
using System; | ||
|
||
namespace HLQ013.Diagnostic.CompoundAssignmentOneTest | ||
{ | ||
partial class C | ||
{ | ||
void Method() | ||
{ | ||
var source = new[] { 1, 2, 3 }; | ||
for (var index = 0; index < source.Length; index += 1) | ||
{ | ||
var item = source[index]; | ||
Console.WriteLine(item); | ||
} | ||
} | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
NetFabric.Hyperlinq.Analyzer.UnitTests/TestData/HLQ013/Diagnostic/PostfixAssignPlusOne.cs
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,17 @@ | ||
using System; | ||
|
||
namespace HLQ013.Diagnostic.PostfixAssignPlusOneTest | ||
{ | ||
partial class C | ||
{ | ||
void Method() | ||
{ | ||
var source = new[] { 1, 2, 3 }; | ||
for (var index = 0; index < source.Length; index = 1 + index) | ||
{ | ||
var item = source[index]; | ||
Console.WriteLine(item); | ||
} | ||
} | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
NetFabric.Hyperlinq.Analyzer.UnitTests/TestData/HLQ013/Diagnostic/PrefixAssignPlusOne.cs
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,17 @@ | ||
using System; | ||
|
||
namespace HLQ013.Diagnostic.PrefixAssignPlusOneTest | ||
{ | ||
partial class C | ||
{ | ||
void Method() | ||
{ | ||
var source = new[] { 1, 2, 3 }; | ||
for (var index = 0; index < source.Length; index = index + 1) | ||
{ | ||
var item = source[index]; | ||
Console.WriteLine(item); | ||
} | ||
} | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
NetFabric.Hyperlinq.Analyzer.UnitTests/TestData/HLQ013/Diagnostic/PrefixIncrement.cs
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,17 @@ | ||
using System; | ||
|
||
namespace HLQ013.Diagnostic.PrefixIncrementTest | ||
{ | ||
partial class C | ||
{ | ||
void Method() | ||
{ | ||
var source = new[] { 1, 2, 3 }; | ||
for (var index = 0; index < source.Length; ++index) | ||
{ | ||
var item = source[index]; | ||
Console.WriteLine(item); | ||
} | ||
} | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
NetFabric.Hyperlinq.Analyzer.UnitTests/TestData/HLQ013/Diagnostic/ReadOnlySpan.cs
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
2 changes: 1 addition & 1 deletion
2
NetFabric.Hyperlinq.Analyzer.UnitTests/TestData/HLQ013/Diagnostic/Span.cs
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
using System; | ||
|
||
namespace HLQ013.Diagnostic.Span | ||
namespace HLQ013.Diagnostic.SpanTest | ||
{ | ||
partial class C | ||
{ | ||
|
18 changes: 18 additions & 0 deletions
18
...ric.Hyperlinq.Analyzer.UnitTests/TestData/HLQ013/NoDiagnostic/CompoundAssignmentNotOne.cs
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,18 @@ | ||
using System; | ||
|
||
namespace HLQ013.NoDiagnostic.CompoundAssignmentNotOneTest | ||
{ | ||
partial class C | ||
{ | ||
void Method() | ||
{ | ||
var source = new[] { 1, 2, 3 }; | ||
|
||
for (var index = 0; index < source.Length; index += 2) // not incrementing by 1 | ||
{ | ||
var item = source[index]; | ||
Console.WriteLine(item); | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.