[.Net] Remove merging primitive from .editorconfig and gitignore (#3676)

* remove merging primitive from .editorconfig and gitignore

* use file scope namespace

* remove file-scope name

* fix format
This commit is contained in:
Xiaoyun Zhang 2024-10-07 10:20:33 -07:00 committed by GitHub
parent 54eaa2bb4e
commit e2c2f98eff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 513 additions and 529 deletions

View File

@ -1,5 +1,4 @@
<<<<<<< HEAD
# EditorConfig is awesome:http://EditorConfig.org
# EditorConfig is awesome:http://EditorConfig.org
# top-most EditorConfig file
root = true
@ -93,7 +92,6 @@ csharp_style_inlined_variable_declaration = true:error
csharp_style_throw_expression = true:suggestion
csharp_style_conditional_delegate_call = true:suggestion
csharp_style_deconstructed_variable_declaration = true:suggestion
=======
; EditorConfig to support per-solution formatting.
; Use the EditorConfig VS add-in to make this work.
; http://editorconfig.org/
@ -137,7 +135,6 @@ csharp_style_var_elsewhere = true:suggestion
# Disallow throw expressions.
csharp_style_throw_expression = false:suggestion
>>>>>>> agnext_main
# Newline settings
csharp_new_line_before_open_brace = all
@ -146,7 +143,6 @@ csharp_new_line_before_catch = true
csharp_new_line_before_finally = true
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_members_in_anonymous_types = true
<<<<<<< HEAD
csharp_new_line_between_query_expression_clauses = true
# Identation options
@ -236,7 +232,6 @@ dotnet_diagnostic.CA2016.severity = suggestion
# disable check for generated code
[*.generated.cs]
generated_code = true
=======
# Namespace settings
csharp_style_namespace_declarations = file_scoped:silent
@ -708,4 +703,3 @@ generated_code = true
# IDE1591 Missing XML comment for publicly visible type or member
dotnet_diagnostic.CS1591.severity = none
>>>>>>> agnext_main

6
dotnet/.gitignore vendored
View File

@ -1,6 +1,4 @@
<<<<<<< HEAD
# gitignore file for C#/VS
=======
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
@ -20,7 +18,6 @@
mono_crash.*
output
>>>>>>> agnext_main
# Build results
[Dd]ebug/
@ -29,7 +26,6 @@ output
[Rr]eleases/
x64/
x86/
<<<<<<< HEAD
build/
bld/
[Bb]in/
@ -51,7 +47,6 @@ output/
# JetBrains Rider
.idea/
=======
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
@ -525,4 +520,3 @@ sk-azfunc-server/local.settings.json
temp
.mono/**
**/values.xml
>>>>>>> agnext_main

View File

@ -3,10 +3,10 @@
using System.Text.Json.Serialization;
namespace AutoGen.Mistral
namespace AutoGen.Mistral;
public class Error
{
public class Error
{
public Error(string type, string message, string? param = default(string), string? code = default(string))
{
Type = type;
@ -35,5 +35,4 @@ namespace AutoGen.Mistral
/// </summary>
[JsonPropertyName("code")]
public string? Code { get; set; }
}
}

View File

@ -10,10 +10,10 @@ using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
// copyright: https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/StyleCop.Analyzers/StyleCop.Analyzers/Helpers/DocumentationCommentExtensions.cs#L17
namespace AutoGen.SourceGenerator
namespace AutoGen.SourceGenerator;
internal static class DocumentCommentExtension
{
internal static class DocumentCommentExtension
{
public static bool IsMissingOrDefault(this SyntaxToken token)
{
return token.IsKind(SyntaxKind.None)
@ -291,5 +291,4 @@ namespace AutoGen.SourceGenerator
// the exterior trivia
return trivia;
}
}
}

View File

@ -12,11 +12,11 @@ using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.Text;
using Newtonsoft.Json;
namespace AutoGen.SourceGenerator
namespace AutoGen.SourceGenerator;
[Generator]
public partial class FunctionCallGenerator : IIncrementalGenerator
{
[Generator]
public partial class FunctionCallGenerator : IIncrementalGenerator
{
private const string FUNCTION_CALL_ATTRIBUTION = "AutoGen.Core.FunctionAttribute";
public void Initialize(IncrementalGeneratorInitializationContext context)
@ -243,5 +243,4 @@ namespace AutoGen.SourceGenerator
ReturnType = method.ReturnType.ToString(),
};
}
}
}

View File

@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// SourceGeneratorFunctionContract.cs
namespace AutoGen.SourceGenerator
namespace AutoGen.SourceGenerator;
internal class SourceGeneratorFunctionContract
{
internal class SourceGeneratorFunctionContract
{
public string? Namespace { get; set; }
public string? ClassName { get; set; }
@ -18,10 +18,10 @@ namespace AutoGen.SourceGenerator
public SourceGeneratorParameterContract[]? Parameters { get; set; }
public string? ReturnType { get; set; }
}
}
internal class SourceGeneratorParameterContract
{
internal class SourceGeneratorParameterContract
{
public string? Name { get; set; }
public string? Description { get; set; }
@ -36,5 +36,4 @@ namespace AutoGen.SourceGenerator
public string? DefaultValue { get; set; }
}
}