-
-
Couldn't load subscription status.
- Fork 273
Closed
Description
Product and Version Used: NuGet package - 4.12.4
Steps to Reproduce: Enable the rule
Example 1
Actual Behavior:
private static readonly FrozenSet<string?> SomeThing =
SomeFunction
.Concat(
[
// some comment
null,
])
.ToFrozenSet();Expected Behavior:
private static readonly FrozenSet<string?> SomeThing =
SomeFunction
.Concat(
[
// some comment
null,
])
.ToFrozenSet();Example 2
Actual Behavior:
return new DefaultAzureCredential(new DefaultAzureCredentialOptions
{
ManagedIdentityClientId = clientId,
ExcludeWorkloadIdentityCredential = true,
Diagnostics =
{
IsAccountIdentifierLoggingEnabled = diagnosticsEnabled,
IsDistributedTracingEnabled = diagnosticsEnabled,
IsLoggingEnabled = diagnosticsEnabled
}
});Expected Behavior:
return new DefaultAzureCredential(new DefaultAzureCredentialOptions
{
ManagedIdentityClientId = clientId,
ExcludeWorkloadIdentityCredential = true,
Diagnostics =
{
IsAccountIdentifierLoggingEnabled = diagnosticsEnabled,
IsDistributedTracingEnabled = diagnosticsEnabled,
IsLoggingEnabled = diagnosticsEnabled
}
});Issue:
So, what is wrong with the above?
- In example 1 open and end brackets have different indentations
- It adds an extra indentation level when one is not needed (see the outer layer in example 2). This conflicts with the default formatter in VS as well.
- If
dotnet formatis run more than once, it seems to indentDiagnosticsin example 2 more than once.
Metadata
Metadata
Assignees
Labels
No labels