Skip to content

Commit de4f3fa

Browse files
authored
AA 0.7 + TokenPaymaster // Large performance improvements & API Cleanup (#46)
Signed-off-by: Firekeeper <[email protected]>
1 parent d9c4a98 commit de4f3fa

File tree

87 files changed

+11603
-11261
lines changed

Some content is hidden

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

87 files changed

+11603
-11261
lines changed

.csharpierrc.json

-6
This file was deleted.

.editorconfig

+113-60
Original file line numberDiff line numberDiff line change
@@ -7,113 +7,163 @@ root = true
77
# XML project files
88
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
99
indent_size = 2
10+
insert_final_newline = true
11+
trim_trailing_whitespace = true
1012

1113
# XML config files
1214
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}]
1315
indent_size = 2
16+
insert_final_newline = true
17+
trim_trailing_whitespace = true
1418

1519
# Code files
1620
[*.{cs,csx,vb,vbx}]
1721
indent_size = 4
1822
insert_final_newline = true
23+
trim_trailing_whitespace = true
1924
charset = utf-8-bom
2025

2126
###############################
2227
# .NET Coding Conventions #
2328
###############################
29+
2430
[*.{cs,vb}]
2531
# Organize usings
26-
dotnet_sort_system_directives_first = true
32+
dotnet_sort_system_directives_first = true:error
33+
dotnet_separate_import_directive_groups = true:error
34+
2735
# this. preferences
28-
dotnet_style_qualification_for_field = false:silent
29-
dotnet_style_qualification_for_property = false:silent
30-
dotnet_style_qualification_for_method = false:silent
31-
dotnet_style_qualification_for_event = false:silent
36+
dotnet_style_qualification_for_field = true:error
37+
dotnet_style_qualification_for_property = true:error
38+
dotnet_style_qualification_for_method = true:error
39+
dotnet_style_qualification_for_event = true:error
40+
3241
# Language keywords vs BCL types preferences
33-
dotnet_style_predefined_type_for_locals_parameters_members = true:silent
34-
dotnet_style_predefined_type_for_member_access = true:silent
42+
dotnet_style_predefined_type_for_locals_parameters_members = true:error
43+
dotnet_style_predefined_type_for_member_access = true:error
44+
3545
# Parentheses preferences
36-
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
37-
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
38-
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
39-
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
46+
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:error
47+
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:error
48+
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:error
49+
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:error
50+
4051
# Modifier preferences
41-
dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
42-
dotnet_style_readonly_field = true:suggestion
52+
dotnet_style_require_accessibility_modifiers = always:error
53+
dotnet_style_readonly_field = true:error
54+
4355
# Expression-level preferences
44-
dotnet_style_object_initializer = true:suggestion
45-
dotnet_style_collection_initializer = true:suggestion
46-
dotnet_style_explicit_tuple_names = true:suggestion
47-
dotnet_style_null_propagation = true:suggestion
48-
dotnet_style_coalesce_expression = true:suggestion
49-
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:silent
50-
dotnet_style_prefer_inferred_tuple_names = true:suggestion
51-
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
52-
dotnet_style_prefer_auto_properties = true:silent
53-
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
54-
dotnet_style_prefer_conditional_expression_over_return = true:silent
56+
dotnet_style_object_initializer = true:error
57+
dotnet_style_collection_initializer = true:error
58+
dotnet_style_explicit_tuple_names = true:error
59+
dotnet_style_null_propagation = true:error
60+
dotnet_style_coalesce_expression = true:error
61+
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:error
62+
dotnet_style_prefer_inferred_tuple_names = true:error
63+
dotnet_style_prefer_inferred_anonymous_type_member_names = true:error
64+
dotnet_style_prefer_auto_properties = true:error
65+
dotnet_style_prefer_conditional_expression_over_assignment = true:error
66+
dotnet_style_prefer_conditional_expression_over_return = true:error
67+
68+
# Namespace preferences
69+
csharp_style_namespace_declarations = file_scoped:error
5570

5671
###############################
5772
# Naming Conventions #
5873
###############################
74+
5975
# Style Definitions
60-
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
61-
# Use PascalCase for constant fields
62-
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
63-
dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
64-
dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
65-
dotnet_naming_symbols.constant_fields.applicable_kinds = field
66-
dotnet_naming_symbols.constant_fields.applicable_accessibilities = *
67-
dotnet_naming_symbols.constant_fields.required_modifiers = const
76+
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
77+
dotnet_style_allow_multiple_blank_lines_experimental = false
78+
79+
# Use PascalCase for constant fields
80+
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = error
81+
dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
82+
dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
83+
dotnet_naming_symbols.constant_fields.applicable_kinds = field
84+
dotnet_naming_symbols.constant_fields.applicable_accessibilities = *
85+
dotnet_naming_symbols.constant_fields.required_modifiers = const
86+
87+
# Use PascalCase for public members (properties, methods, events)
88+
dotnet_naming_rule.public_members_should_be_pascal_case.severity = error
89+
dotnet_naming_rule.public_members_should_be_pascal_case.symbols = public_members
90+
dotnet_naming_rule.public_members_should_be_pascal_case.style = pascal_case_style
91+
dotnet_naming_symbols.public_members.applicable_kinds = property,method,event,field
92+
dotnet_naming_symbols.public_members.applicable_accessibilities = public,protected,internal,protected_internal
93+
94+
# Use camelCase with '_' prefix for private fields
95+
dotnet_naming_style.underscore_prefix_style.capitalization = camel_case
96+
dotnet_naming_style.underscore_prefix_style.required_prefix = _
97+
dotnet_naming_rule.private_fields_should_have_underscore_prefix.severity = error
98+
dotnet_naming_rule.private_fields_should_have_underscore_prefix.symbols = private_fields
99+
dotnet_naming_rule.private_fields_should_have_underscore_prefix.style = underscore_prefix_style
100+
dotnet_naming_symbols.private_fields.applicable_kinds = field
101+
dotnet_naming_symbols.private_fields.applicable_accessibilities = private
68102

69103
###############################
70104
# Analyzers #
71105
###############################
72-
dotnet_analyzer_diagnostic.category-CodeQuality.severity = suggestion
73-
dotnet_analyzer_diagnostic.category-Documentation.severity = suggestion
74-
dotnet_analyzer_diagnostic.category-Design.severity = suggestion
75-
dotnet_analyzer_diagnostic.category-Performance.severity = suggestion
76-
dotnet_analyzer_diagnostic.category-Reliability.severity = warning
77-
dotnet_analyzer_diagnostic.category-Security.severity = warning
78-
dotnet_analyzer_diagnostic.category-Style.severity = suggestion
106+
107+
dotnet_analyzer_diagnostic.category-CodeQuality.severity = error
108+
dotnet_analyzer_diagnostic.category-Documentation.severity = error
109+
dotnet_analyzer_diagnostic.category-Design.severity = error
110+
dotnet_analyzer_diagnostic.category-Performance.severity = error
111+
dotnet_analyzer_diagnostic.category-Reliability.severity = error
112+
dotnet_analyzer_diagnostic.category-Security.severity = error
113+
dotnet_analyzer_diagnostic.category-Style.severity = error
79114

80115
# Explicit code exclusions
81-
dotnet_diagnostic.IDE0160.severity = none
82-
dotnet_diagnostic.CA1848.severity = none
116+
# Namespace does not match folder structure
117+
dotnet_diagnostic.IDE0130.severity = none
118+
# Collection initialization can be simplified
119+
dotnet_diagnostic.IDE0301.severity = none
120+
dotnet_diagnostic.IDE0300.severity = none
121+
dotnet_diagnostic.IDE0305.severity = none
122+
# If statement can be simplified
123+
dotnet_diagnostic.IDE0046.severity = none
124+
dotnet_diagnostic.IDE0045.severity = none
125+
# Use switch expression
126+
dotnet_diagnostic.IDE0066.severity = none
83127

84128
###############################
85129
# C# Coding Conventions #
86130
###############################
87131
[*.cs]
88132
# var preferences
89-
csharp_style_var_for_built_in_types = true:silent
90-
csharp_style_var_when_type_is_apparent = true:silent
91-
csharp_style_var_elsewhere = true:silent
133+
csharp_style_var_for_built_in_types = true:error
134+
csharp_style_var_when_type_is_apparent = true:error
135+
csharp_style_var_elsewhere = true:error
136+
92137
# Expression-bodied members
93-
csharp_style_expression_bodied_methods = false:silent
94-
csharp_style_expression_bodied_constructors = false:silent
95-
csharp_style_expression_bodied_operators = false:silent
96-
csharp_style_expression_bodied_properties = true:silent
97-
csharp_style_expression_bodied_indexers = true:silent
98-
csharp_style_expression_bodied_accessors = true:silent
138+
csharp_style_expression_bodied_methods = when_possible:error
139+
csharp_style_expression_bodied_constructors = when_possible:error
140+
csharp_style_expression_bodied_operators = when_possible:error
141+
csharp_style_expression_bodied_properties = when_possible:error
142+
csharp_style_expression_bodied_indexers = when_possible:error
143+
csharp_style_expression_bodied_accessors = when_possible:error
144+
99145
# Pattern matching preferences
100-
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
101-
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
146+
csharp_style_pattern_matching_over_is_with_cast_check = true:error
147+
csharp_style_pattern_matching_over_as_with_null_check = true:error
148+
102149
# Null-checking preferences
103-
csharp_style_throw_expression = true:suggestion
104-
csharp_style_conditional_delegate_call = true:suggestion
150+
csharp_style_throw_expression = true:error
151+
csharp_style_conditional_delegate_call = true:error
152+
105153
# Modifier preferences
106-
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion
154+
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:error
155+
107156
# Expression-level preferences
108-
csharp_prefer_braces = true:silent
109-
csharp_style_deconstructed_variable_declaration = true:suggestion
110-
csharp_prefer_simple_default_expression = true:suggestion
111-
csharp_style_pattern_local_over_anonymous_function = true:suggestion
112-
csharp_style_inlined_variable_declaration = true:suggestion
157+
csharp_prefer_braces = true:error
158+
csharp_style_deconstructed_variable_declaration = true:error
159+
csharp_prefer_simple_default_expression = true:error
160+
csharp_style_pattern_local_over_anonymous_function = true:error
161+
csharp_style_inlined_variable_declaration = true:error
113162

114163
###############################
115164
# C# Formatting Rules #
116165
###############################
166+
117167
# New line preferences
118168
csharp_new_line_before_open_brace = all
119169
csharp_new_line_before_else = true
@@ -122,10 +172,12 @@ csharp_new_line_before_finally = true
122172
csharp_new_line_before_members_in_object_initializers = true
123173
csharp_new_line_before_members_in_anonymous_types = true
124174
csharp_new_line_between_query_expression_clauses = true
175+
125176
# Indentation preferences
126177
csharp_indent_case_contents = true
127178
csharp_indent_switch_labels = true
128179
csharp_indent_labels = flush_left
180+
129181
# Space preferences
130182
csharp_space_after_cast = false
131183
csharp_space_after_keywords_in_control_flow_statements = true
@@ -138,6 +190,7 @@ csharp_space_around_binary_operators = before_and_after
138190
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
139191
csharp_space_between_method_call_name_and_opening_parenthesis = false
140192
csharp_space_between_method_call_empty_parameter_list_parentheses = false
193+
141194
# Wrapping preferences
142195
csharp_preserve_single_line_statements = true
143196
csharp_preserve_single_line_blocks = true

Directory.Build.props

+15-14
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<PropertyGroup>
4-
<DefaultVersion>1.4.0</DefaultVersion>
5-
<DefaultTargetFrameworks>netstandard2.1;net6.0;net7.0;net8.0</DefaultTargetFrameworks>
6-
</PropertyGroup>
7-
<PropertyGroup Label="C#">
8-
<LangVersion>latest</LangVersion>
9-
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
10-
<ImplicitUsings>enable</ImplicitUsings>
11-
</PropertyGroup>
3+
<PropertyGroup>
4+
<DefaultVersion>1.4.0</DefaultVersion>
5+
<DefaultTargetFrameworks>netstandard2.1;net6.0;net7.0;net8.0</DefaultTargetFrameworks>
6+
</PropertyGroup>
127

13-
<PropertyGroup>
14-
<DefaultAssemblyVersion>$(DefaultVersion)</DefaultAssemblyVersion>
15-
<DefaultPackageVersion>$(DefaultVersion)</DefaultPackageVersion>
16-
<DefaultFileVersion>$(DefaultVersion)</DefaultFileVersion>
17-
</PropertyGroup>
8+
<PropertyGroup Label="C#">
9+
<LangVersion>latest</LangVersion>
10+
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
11+
<ImplicitUsings>enable</ImplicitUsings>
12+
</PropertyGroup>
13+
14+
<PropertyGroup>
15+
<DefaultAssemblyVersion>$(DefaultVersion)</DefaultAssemblyVersion>
16+
<DefaultPackageVersion>$(DefaultVersion)</DefaultPackageVersion>
17+
<DefaultFileVersion>$(DefaultVersion)</DefaultFileVersion>
18+
</PropertyGroup>
1819
</Project>

0 commit comments

Comments
 (0)