Skip to content
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

Add newly introduced modifiers to our csharp_preferred_modifier_order editorconfig #86668

Merged
merged 4 commits into from
Jun 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ csharp_indent_switch_labels = true
csharp_indent_labels = one_less_than_current

# Modifier preferences
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion
csharp_preferred_modifier_order = public,private,protected,internal,file,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,required,volatile,async:suggestion

# avoid this. unless absolutely necessary
dotnet_style_qualification_for_field = false:suggestion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public StatementSyntax GenerateClearUnmanagedValuesSource(TypePositionInfo info,
}

#pragma warning disable SA1400 // Access modifier should be declared https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/3659
static file class ElementsMarshallingCollectionSourceExtensions
file static class ElementsMarshallingCollectionSourceExtensions
#pragma warning restore SA1400 // Access modifier should be declared
{
public static StatementSyntax GetNumElementsAssignmentFromManagedValuesSource(this IElementsMarshallingCollectionSource source, TypePositionInfo info, StubCodeContext context)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ IEnumerable<StatementSyntax> GenerateStatementsFromInner(StubCodeContext context
}

#pragma warning disable SA1400 // Access modifier should be declared https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/3659
sealed file record OwnedValueCodeContext : StubCodeContext
file sealed record OwnedValueCodeContext : StubCodeContext
#pragma warning restore SA1400 // Access modifier should be declared
{
private readonly StubCodeContext _innerContext;
Expand Down Expand Up @@ -197,7 +197,7 @@ public override (string managed, string native) GetIdentifiers(TypePositionInfo
}

#pragma warning disable SA1400 // Access modifier should be declared https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/3659
static file class OwnershipTrackingHelpers
file static class OwnershipTrackingHelpers
#pragma warning restore SA1400 // Access modifier should be declared
{
public const string OwnOriginalValueIdentifier = "ownOriginal";
Expand Down