Skip to content

Commit

Permalink
Add newly introduced modifiers to our csharp_preferred_modifier_order…
Browse files Browse the repository at this point in the history
… editorconfig (#86668)
  • Loading branch information
jkoritzinsky committed Jun 9, 2023
1 parent 89ef7f4 commit 7de4e1b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
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

0 comments on commit 7de4e1b

Please sign in to comment.