Skip to content

Commit 3a5dbc6

Browse files
authored
Named all local variables using camelCase (#8395)
1 parent 2ea9c45 commit 3a5dbc6

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

.editorconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,13 @@ dotnet_naming_symbols.static_fields.applicable_accessibilities = private, intern
159159
dotnet_naming_style.static_prefix_style.required_prefix = s_
160160
dotnet_naming_style.static_prefix_style.capitalization = camel_case
161161

162+
# Name all local variables using camelCase
163+
dotnet_naming_rule.local_variables_should_be_camel_case.severity = warning
164+
dotnet_naming_rule.local_variables_should_be_camel_case.symbols = local_variables
165+
dotnet_naming_rule.local_variables_should_be_camel_case.style = camel_case_style
166+
dotnet_naming_symbols.local_variables.applicable_kinds = local
167+
dotnet_naming_style.camel_case_style.capitalization = camel_case
168+
162169
# Use ArgumentNullException throw helper.
163170
dotnet_diagnostic.CA1510.severity = warning
164171
# Use ArgumentException throw helper.

src/HotChocolate/AzureFunctions/test/HotChocolate.AzureFunctions.IsolatedProcess.Tests/IsolatedProcessEndToEndTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public async Task AzFuncIsolatedProcess_EndToEndTestAsync()
4949
[Fact]
5050
public async Task AzFuncIsolatedProcess_FunctionsContextItemsTestAsync()
5151
{
52-
const string DarkSideLeaderKey = "DarkSideLeader";
52+
const string darkSideLeaderKey = "DarkSideLeader";
5353

5454
var host = new MockIsolatedProcessHostBuilder()
5555
.AddGraphQLFunction(graphQL =>
@@ -60,7 +60,7 @@ public async Task AzFuncIsolatedProcess_FunctionsContextItemsTestAsync()
6060
var darkSideLeader = ctx.ContextData.TryGetValue(
6161
nameof(HttpContext),
6262
out var httpContext)
63-
? (httpContext as HttpContext)?.Items[DarkSideLeaderKey] as string
63+
? (httpContext as HttpContext)?.Items[darkSideLeaderKey] as string
6464
: null;
6565

6666
return darkSideLeader;
@@ -79,7 +79,7 @@ public async Task AzFuncIsolatedProcess_FunctionsContextItemsTestAsync()
7979
}");
8080

8181
//Set Up our global Items now available from the Functions Context...
82-
request.FunctionContext.Items.Add(DarkSideLeaderKey, "Darth Vader");
82+
request.FunctionContext.Items.Add(darkSideLeaderKey, "Darth Vader");
8383

8484
// Execute Query Test for end-to-end validation...
8585
// NOTE: This uses the new Az Func Isolated Process extension to execute

src/HotChocolate/Core/test/Types.Tests/Regressions/NestedOptionalInt_2114.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public async Task ShouldNotFailWithExplicitValues()
1919
return true;
2020
});
2121

22-
const string Query = @"
22+
const string query = @"
2323
mutation {
2424
eat(topping: {
2525
pickles: [ {
@@ -29,7 +29,7 @@ public async Task ShouldNotFailWithExplicitValues()
2929
complexAssignedNull: null, complexList: [ { value: 2 } ] } } ] })
3030
}";
3131
// act
32-
var result = await executor.ExecuteAsync(Query);
32+
var result = await executor.ExecuteAsync(query);
3333

3434
// assert
3535
Assert.Null(result.ExpectOperationResult().Errors);
@@ -47,7 +47,7 @@ public async Task ShouldNotFailWithVariables()
4747
return true;
4848
});
4949

50-
const string Query = @"
50+
const string query = @"
5151
mutation a($input: ButterPickleInput!)
5252
{
5353
eat(topping: {
@@ -58,7 +58,7 @@ mutation a($input: ButterPickleInput!)
5858

5959
// act
6060
var result = await executor.ExecuteAsync(
61-
Query,
61+
query,
6262
new Dictionary<string, object?>
6363
{
6464
{

0 commit comments

Comments
 (0)