Skip to content

Commit 235c538

Browse files
authored
Fixed formatting (#8382)
1 parent 315116a commit 235c538

File tree

324 files changed

+947
-892
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

324 files changed

+947
-892
lines changed

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ csharp_new_line_before_members_in_object_initializers = true
9191
csharp_indent_case_contents = true
9292
csharp_indent_switch_labels = true
9393
csharp_indent_labels = flush_left
94+
csharp_indent_case_contents_when_block = false
9495

9596
# Spacing options
9697
csharp_space_after_cast = false
@@ -174,6 +175,8 @@ dotnet_diagnostic.IDE0005.severity = warning
174175
dotnet_diagnostic.IDE0028.severity = warning
175176
# Order modifiers.
176177
dotnet_diagnostic.IDE0036.severity = warning
178+
# Formatting rule.
179+
dotnet_diagnostic.IDE0055.severity = warning
177180
# Use range operator.
178181
dotnet_diagnostic.IDE0057.severity = warning
179182
# Use pattern matching (not operator).

src/CookieCrumble/src/CookieCrumble.HotChocolate/Formatters/OperationResultSnapshotValueFormatter.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ protected override void Format(IBufferWriter<byte> snapshot, OperationResult val
1111
{
1212
var next = false;
1313

14-
if(value.RequestIndex.HasValue)
14+
if (value.RequestIndex.HasValue)
1515
{
1616
snapshot.Append("RequestIndex: ");
1717
snapshot.Append(value.RequestIndex.Value.ToString());
1818
next = true;
1919
}
2020

21-
if(value.VariableIndex.HasValue)
21+
if (value.VariableIndex.HasValue)
2222
{
2323
snapshot.AppendLine(appendWhenTrue: next);
2424
snapshot.Append("VariableIndex: ");

src/CookieCrumble/src/CookieCrumble.Xunit/Attributes/UseCultureAttribute.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public class UseCultureAttribute : BeforeAfterTestAttribute
1818
{
1919
private readonly Lazy<CultureInfo> _culture;
2020
private readonly Lazy<CultureInfo> _uiCulture;
21-
private CultureInfo _originalCulture = null!;
21+
private CultureInfo _originalCulture = null!;
2222
private CultureInfo _originalUiCulture = null!;
2323

2424
/// <summary>

src/CookieCrumble/src/CookieCrumble/Extensions/WriterExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public static void AppendSeparator(this IBufferWriter<byte> snapshot)
3737
const byte hyphen = (byte)'-';
3838
var span = snapshot.GetSpan(15);
3939

40-
for(var i = 0; i < 15; i++)
40+
for (var i = 0; i < 15; i++)
4141
{
4242
span[i] = hyphen;
4343
}

src/GreenDonut/src/GreenDonut.Data.EntityFramework/Expressions/ExtractSelectExpressionVisitor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@ private static LambdaExpression ConvertToLambda(Expression e)
4343

4444
// Convert the property expression into a lambda expression
4545
var typeArguments = e.Type.GetGenericArguments()[0].GetGenericArguments();
46-
return Expression.Lambda(e, Expression.Parameter(typeArguments[0]));
46+
return Expression.Lambda(e, Expression.Parameter(typeArguments[0]));
4747
}
4848
}

src/GreenDonut/src/GreenDonut.Data.EntityFramework/Expressions/QueryHelpers.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public static IQueryable<T> EnsureOrderPropsAreSelected<T>(
1414
}
1515

1616
var orderByProperties = ExtractOrderProperties(query);
17-
if(orderByProperties.Count == 0)
17+
if (orderByProperties.Count == 0)
1818
{
1919
return query;
2020
}

src/GreenDonut/src/GreenDonut.Data.Primitives/SortDefinition.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public sealed record SortDefinition<T>
2020
/// </param>
2121
public SortDefinition(params ISortBy<T>[] operations)
2222
{
23-
Operations = [..operations];
23+
Operations = [.. operations];
2424
}
2525

2626
/// <summary>
@@ -31,7 +31,7 @@ public SortDefinition(params ISortBy<T>[] operations)
3131
/// </param>
3232
public SortDefinition(IEnumerable<ISortBy<T>> operations)
3333
{
34-
Operations = [..operations];
34+
Operations = [.. operations];
3535
}
3636

3737
/// <summary>

src/GreenDonut/src/GreenDonut.Data/Cursors/CursorParser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ static int ExpectSeparator(ReadOnlySpan<byte> span, byte separator)
164164
{
165165
var index = span.IndexOf(separator);
166166

167-
if(index == -1)
167+
if (index == -1)
168168
{
169169
throw new InvalidOperationException(
170170
"The cursor page info could not be parsed.");

src/GreenDonut/src/GreenDonut.Data/DefaultPredicateBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public sealed class DefaultPredicateBuilder : IPredicateBuilder
1919
/// </param>
2020
public DefaultPredicateBuilder(LambdaExpression? initialPredicate)
2121
{
22-
if(initialPredicate is not null)
22+
if (initialPredicate is not null)
2323
{
2424
_predicates = _predicates.Add(initialPredicate);
2525
}

src/GreenDonut/src/GreenDonut.Data/Extensions/GreenDonutQueryContextExtensions.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ public static QueryContext<TEntity> Include<TEntity, TValue>(
1515
{
1616
ArgumentNullException.ThrowIfNull(context);
1717

18-
if(propertySelector is null)
18+
if (propertySelector is null)
1919
{
2020
return context;
2121
}
2222

2323
var normalizedSelector = ExpressionHelpers.Rewrite(propertySelector);
2424

25-
if(context.Selector is null)
25+
if (context.Selector is null)
2626
{
2727
return context with
2828
{
@@ -44,12 +44,12 @@ public static QueryContext<TEntity> Select<TEntity>(
4444
{
4545
ArgumentNullException.ThrowIfNull(context);
4646

47-
if(selector is null)
47+
if (selector is null)
4848
{
4949
return context;
5050
}
5151

52-
if(context.Selector is null)
52+
if (context.Selector is null)
5353
{
5454
return context with
5555
{

0 commit comments

Comments
 (0)