-
-
Notifications
You must be signed in to change notification settings - Fork 519
Syntax formatting based on dotnet format tool #762
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request applies syntax formatting changes based on the dotnet format
tool to standardize code formatting across the C# codebase.
- Converts traditional namespace declarations to file-scoped namespaces
- Moves opening braces to the same line for class and method declarations
- Replaces
new List<T>()
with collection expressions[]
- Replaces
new Dictionary<T>()
with collection expressions[]
Reviewed Changes
Copilot reviewed 84 out of 85 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
SqlKata.Execution/XQuery.cs | Updated namespace declaration and brace formatting |
SqlKata.Execution/QueryFactory.cs | Updated namespace declaration, brace formatting, and collection initializers |
SqlKata.Execution/Query.Extensions.cs | Updated namespace declaration and brace formatting |
SqlKata.Execution/Properties/AssemblyInfo.cs | Removed BOM character |
SqlKata.Execution/PaginationResult.cs | Updated namespace declaration and brace formatting |
SqlKata.Execution/PaginationIterator.cs | Updated namespace declaration and brace formatting |
SqlKata.Execution/InsertGetId.cs | Updated namespace declaration and brace formatting |
QueryBuilder/Variable.cs | Updated namespace declaration and brace formatting |
QueryBuilder/UnsafeLiteral.cs | Updated namespace declaration and brace formatting |
QueryBuilder/SqlResult.cs | Updated namespace declaration, brace formatting, and collection initializers |
QueryBuilder/Query.cs | Updated namespace declaration, brace formatting, and collection initializers |
QueryBuilder/Query.Update.cs | Updated namespace declaration and brace formatting |
QueryBuilder/Query.Select.cs | Updated namespace declaration and brace formatting |
QueryBuilder/Query.Join.cs | Updated namespace declaration and brace formatting |
QueryBuilder/Query.Insert.cs | Updated namespace declaration and brace formatting |
QueryBuilder/Query.Having.cs | Updated namespace declaration and brace formatting |
QueryBuilder/Query.Delete.cs | Updated namespace declaration and brace formatting |
QueryBuilder/Query.Combine.cs | Updated namespace declaration and brace formatting |
QueryBuilder/Query.Aggregate.cs | Updated namespace declaration, brace formatting, and collection initializers |
QueryBuilder/Join.cs | Updated namespace declaration and brace formatting |
QueryBuilder/Include.cs | Updated namespace declaration and brace formatting |
QueryBuilder/IgnoreAttribute.cs | Updated namespace declaration and brace formatting |
QueryBuilder/Helper.cs | Updated namespace declaration, brace formatting, and collection initializers |
QueryBuilder/Extensions/QueryForExtensions.cs | Updated namespace declaration and brace formatting |
QueryBuilder/Expressions.cs | Updated namespace declaration and brace formatting |
QueryBuilder/Compilers/SqliteCompiler.cs | Updated namespace declaration and brace formatting |
QueryBuilder/Compilers/SqlServerCompiler.cs | Updated namespace declaration and brace formatting |
QueryBuilder/Compilers/PostgresCompiler.cs | Updated namespace declaration and brace formatting |
QueryBuilder/Compilers/OracleCompiler.cs | Updated namespace declaration and brace formatting |
QueryBuilder/Compilers/MySqlCompiler.cs | Updated namespace declaration and brace formatting |
QueryBuilder/Compilers/FirebirdCompiler.cs | Updated namespace declaration and brace formatting |
QueryBuilder/Compilers/EngineCodes.cs | Updated namespace declaration and brace formatting |
QueryBuilder/Compilers/CteFinder.cs | Updated namespace declaration, brace formatting, and collection initializers |
QueryBuilder/Compilers/ConditionsCompilerProvider.cs | Updated namespace declaration, brace formatting, and collection initializers |
QueryBuilder/Compilers/Compiler.cs | Updated namespace declaration, brace formatting, and collection initializers |
QueryBuilder/Compilers/Compiler.Conditions.cs | Updated namespace declaration and brace formatting |
QueryBuilder/ColumnAttribute.cs | Updated namespace declaration and brace formatting |
QueryBuilder/Clauses/OrderClause.cs | Updated namespace declaration and brace formatting |
QueryBuilder/Clauses/OffsetClause.cs | Updated namespace declaration and brace formatting |
QueryBuilder/Clauses/LimitClause.cs | Updated namespace declaration and brace formatting |
QueryBuilder/Clauses/JoinClause.cs | Updated namespace declaration and brace formatting |
QueryBuilder/Clauses/InsertClause.cs | Updated namespace declaration and brace formatting |
QueryBuilder/Clauses/IncrementClause.cs | Updated namespace declaration and brace formatting |
QueryBuilder/Clauses/FromClause.cs | Updated namespace declaration and brace formatting |
QueryBuilder/Clauses/ConditionClause.cs | Updated namespace declaration and brace formatting |
QueryBuilder/Clauses/Combine.cs | Updated namespace declaration and brace formatting |
QueryBuilder/Clauses/ColumnClause.cs | Updated namespace declaration and brace formatting |
QueryBuilder/Clauses/AggregateClause.cs | Updated namespace declaration, brace formatting, and collection initializers |
QueryBuilder/Clauses/AbstractClause.cs | Updated namespace declaration and brace formatting |
QueryBuilder/BaseQuery.cs | Updated namespace declaration, brace formatting, and collection initializers |
QueryBuilder/Base.Where.cs | Updated namespace declaration and brace formatting |
QueryBuilder.Tests/WhereTests.cs | Updated namespace declaration and brace formatting |
QueryBuilder.Tests/UpdateTests.cs | Updated namespace declaration and brace formatting |
QueryBuilder.Tests/Sqlite/SqliteLimitTests.cs | Updated namespace declaration and brace formatting |
QueryBuilder.Tests/SqlServer/SqlServerTests.cs | Updated namespace declaration and brace formatting |
QueryBuilder.Tests/SqlServer/SqlServerLimitTests.cs | Updated namespace declaration and brace formatting |
QueryBuilder.Tests/SqlServer/SqlServerLegacyLimitTests.cs | Updated namespace declaration and brace formatting |
QueryBuilder.Tests/SqlServer/NestedSelectTests.cs | Updated namespace declaration and brace formatting |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
||
foreach (var item in dynamicResult) { | ||
var localValue = item[include.LocalKey].ToString(); | ||
item[include.Name] = children.ContainsKey(localValue) ? children[localValue] : []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The empty collection expression []
requires explicit type inference. Consider using new List<Dictionary<string, object>>()
for clarity, as the compiler may not be able to infer the correct type in all contexts.
item[include.Name] = children.ContainsKey(localValue) ? children[localValue] : []; | |
item[include.Name] = children.ContainsKey(localValue) ? children[localValue] : new List<Dictionary<string, object>>(); |
Copilot uses AI. Check for mistakes.
|
||
foreach (var item in dynamicResult) { | ||
var localValue = item[include.LocalKey].ToString(); | ||
item[include.Name] = children.ContainsKey(localValue) ? children[localValue] : []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The empty collection expression []
requires explicit type inference. Consider using new List<Dictionary<string, object>>()
for clarity, as the compiler may not be able to infer the correct type in all contexts.
item[include.Name] = children.ContainsKey(localValue) ? children[localValue] : []; | |
item[include.Name] = children.ContainsKey(localValue) ? children[localValue] : new List<Dictionary<string, object>>(); |
Copilot uses AI. Check for mistakes.
if (alias != null) { | ||
query.As(alias); | ||
} | ||
; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The semicolon after the closing brace is unnecessary and should be removed.
; |
Copilot uses AI. Check for mistakes.
No behavioral changes