-
Notifications
You must be signed in to change notification settings - Fork 512
Update SA1402 to handle records and record structs #3570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
sharwell
merged 3 commits into
DotNetAnalyzers:master
from
bjornhellander:feature/sa1402-record
Feb 10, 2023
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
18 changes: 18 additions & 0 deletions
18
...op.Analyzers.Test.CSharp10/MaintainabilityRules/SA1402CSharp10ForRecordStructUnitTests.cs
This file contains hidden or 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 @@ | ||
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. | ||
// Licensed under the MIT License. See LICENSE in the project root for license information. | ||
|
||
#nullable disable | ||
|
||
namespace StyleCop.Analyzers.Test.CSharp10.MaintainabilityRules | ||
{ | ||
using StyleCop.Analyzers.Test.MaintainabilityRules; | ||
|
||
public class SA1402CSharp10ForRecordStructUnitTests : SA1402ForBlockDeclarationUnitTestsBase | ||
sharwell marked this conversation as resolved.
Show resolved
Hide resolved
|
||
{ | ||
public override string Keyword => "record struct"; | ||
|
||
protected override string SettingKeyword => "struct"; | ||
|
||
protected override bool IsConfiguredAsTopLevelTypeByDefault => false; | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
...StyleCop.Analyzers.Test.CSharp10/MaintainabilityRules/SA1402CSharp10ForRecordUnitTests.cs
This file contains hidden or 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,13 @@ | ||
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. | ||
// Licensed under the MIT License. See LICENSE in the project root for license information. | ||
|
||
#nullable disable | ||
|
||
namespace StyleCop.Analyzers.Test.CSharp10.MaintainabilityRules | ||
{ | ||
using StyleCop.Analyzers.Test.CSharp9.MaintainabilityRules; | ||
|
||
public class SA1402CSharp10ForRecordUnitTests : SA1402CSharp9ForRecordUnitTests | ||
{ | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
...op.Analyzers.Test.CSharp11/MaintainabilityRules/SA1402CSharp11ForRecordStructUnitTests.cs
This file contains hidden or 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,11 @@ | ||
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. | ||
// Licensed under the MIT License. See LICENSE in the project root for license information. | ||
|
||
namespace StyleCop.Analyzers.Test.CSharp11.MaintainabilityRules | ||
{ | ||
using StyleCop.Analyzers.Test.CSharp10.MaintainabilityRules; | ||
|
||
public class SA1402CSharp11ForRecordStructUnitTests : SA1402CSharp10ForRecordStructUnitTests | ||
{ | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
...StyleCop.Analyzers.Test.CSharp11/MaintainabilityRules/SA1402CSharp11ForRecordUnitTests.cs
This file contains hidden or 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,11 @@ | ||
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. | ||
// Licensed under the MIT License. See LICENSE in the project root for license information. | ||
|
||
namespace StyleCop.Analyzers.Test.CSharp11.MaintainabilityRules | ||
{ | ||
using StyleCop.Analyzers.Test.CSharp10.MaintainabilityRules; | ||
|
||
public class SA1402CSharp11ForRecordUnitTests : SA1402CSharp10ForRecordUnitTests | ||
{ | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
...s/StyleCop.Analyzers.Test.CSharp9/MaintainabilityRules/SA1402CSharp9ForRecordUnitTests.cs
This file contains hidden or 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,16 @@ | ||
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. | ||
// Licensed under the MIT License. See LICENSE in the project root for license information. | ||
|
||
namespace StyleCop.Analyzers.Test.CSharp9.MaintainabilityRules | ||
{ | ||
using StyleCop.Analyzers.Test.MaintainabilityRules; | ||
|
||
public class SA1402CSharp9ForRecordUnitTests : SA1402ForBlockDeclarationUnitTestsBase | ||
{ | ||
public override string Keyword => "record"; | ||
|
||
protected override string SettingKeyword => "class"; | ||
|
||
protected override bool IsConfiguredAsTopLevelTypeByDefault => true; | ||
} | ||
} |
This file contains hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.