Skip to content

Commit e4cd6cf

Browse files
committed
Initial commit
0 parents  commit e4cd6cf

19 files changed

+1214
-0
lines changed

.editorconfig

Lines changed: 298 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,298 @@
1+
# Remove the line below if you want to inherit .editorconfig settings from higher directories
2+
root = true
3+
4+
[*]
5+
6+
#### Core EditorConfig Options ####
7+
8+
# Indentation and spacing
9+
indent_size = 4
10+
indent_style = space
11+
tab_width = 4
12+
trim_trailing_whitespace = true
13+
14+
# New line preferences
15+
end_of_line = unset
16+
insert_final_newline = unset
17+
18+
dotnet_style_null_propagation = true:suggestion
19+
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
20+
dotnet_style_prefer_auto_properties = true:suggestion
21+
dotnet_style_operator_placement_when_wrapping = beginning_of_line
22+
dotnet_style_object_initializer = true:suggestion
23+
dotnet_style_coalesce_expression = true:suggestion
24+
dotnet_style_collection_initializer = true:suggestion
25+
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
26+
dotnet_style_prefer_conditional_expression_over_assignment = false:silent
27+
dotnet_style_prefer_conditional_expression_over_return = false:silent
28+
dotnet_style_explicit_tuple_names = true:suggestion
29+
dotnet_style_prefer_inferred_tuple_names = true:suggestion
30+
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
31+
dotnet_style_prefer_compound_assignment = true:suggestion
32+
dotnet_style_prefer_simplified_interpolation = true:suggestion
33+
dotnet_style_namespace_match_folder = false:silent
34+
dotnet_style_readonly_field = true:suggestion
35+
dotnet_style_predefined_type_for_locals_parameters_members = true:silent
36+
dotnet_style_predefined_type_for_member_access = true:silent
37+
dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
38+
dotnet_style_allow_multiple_blank_lines_experimental = false:error
39+
dotnet_style_allow_statement_immediately_after_block_experimental = false:error
40+
dotnet_code_quality_unused_parameters = all:suggestion
41+
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
42+
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
43+
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
44+
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
45+
dotnet_style_qualification_for_event = false:silent
46+
dotnet_style_qualification_for_method = false:silent
47+
dotnet_style_qualification_for_property = false:silent
48+
dotnet_style_qualification_for_field = false:silent
49+
dotnet_style_prefer_collection_expression = when_types_loosely_match:suggestion
50+
51+
# C# files
52+
[*.cs]
53+
54+
#### .NET Coding Conventions ####
55+
56+
# Organize usings
57+
dotnet_separate_import_directive_groups = false
58+
dotnet_sort_system_directives_first = true
59+
file_header_template = unset
60+
61+
# this. and Me. preferences
62+
dotnet_style_qualification_for_event = false:silent
63+
dotnet_style_qualification_for_field = false:silent
64+
dotnet_style_qualification_for_method = false:silent
65+
dotnet_style_qualification_for_property = false:silent
66+
67+
# Language keywords vs BCL types preferences
68+
dotnet_style_predefined_type_for_locals_parameters_members = true:silent
69+
dotnet_style_predefined_type_for_member_access = true:silent
70+
71+
# Parentheses preferences
72+
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
73+
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
74+
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
75+
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
76+
77+
# Modifier preferences
78+
dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
79+
80+
# Expression-level preferences
81+
csharp_style_prefer_local_over_anonymous_function = true:silent
82+
csharp_style_prefer_extended_property_pattern = true:suggestion
83+
csharp_style_implicit_object_creation_when_type_is_apparent = true:silent
84+
csharp_style_prefer_tuple_swap = true:silent
85+
86+
# Field preferences
87+
dotnet_style_readonly_field = true:suggestion
88+
89+
# Parameter preferences
90+
dotnet_code_quality_unused_parameters = all:suggestion
91+
92+
# Suppression preferences
93+
dotnet_remove_unnecessary_suppression_exclusions = none
94+
95+
#### C# Coding Conventions ####
96+
97+
# var preferences
98+
csharp_style_var_elsewhere = true:suggestion
99+
csharp_style_var_for_built_in_types = true:suggestion
100+
csharp_style_var_when_type_is_apparent = true:suggestion
101+
102+
# Expression-bodied members preferences
103+
csharp_style_expression_bodied_accessors = true:silent
104+
csharp_style_expression_bodied_constructors = false:silent
105+
csharp_style_expression_bodied_indexers = true:silent
106+
csharp_style_expression_bodied_lambdas = true:silent
107+
csharp_style_expression_bodied_local_functions = true:silent
108+
csharp_style_expression_bodied_methods = when_on_single_line:silent
109+
csharp_style_expression_bodied_operators = true:silent
110+
csharp_style_expression_bodied_properties = true:silent
111+
112+
# Pattern matching preferences
113+
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
114+
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
115+
csharp_style_prefer_not_pattern = true:suggestion
116+
csharp_style_prefer_pattern_matching = true:suggestion
117+
csharp_style_prefer_switch_expression = true:suggestion
118+
119+
# Null-checking preferences
120+
csharp_style_conditional_delegate_call = true:suggestion
121+
csharp_style_prefer_parameter_null_checking = true:suggestion
122+
csharp_style_prefer_null_check_over_type_check = true:suggestion
123+
124+
# Modifier preferences
125+
csharp_prefer_static_local_function = true:suggestion
126+
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:silent
127+
128+
# Code-block preferences
129+
csharp_style_prefer_top_level_statements = true:suggestion
130+
csharp_style_prefer_primary_constructors = true:suggestion
131+
csharp_prefer_braces = true:silent
132+
csharp_prefer_simple_using_statement = true:suggestion
133+
csharp_style_namespace_declarations = file_scoped:suggestion
134+
csharp_style_prefer_method_group_conversion = true:silent
135+
136+
# Expression-level preferences
137+
csharp_prefer_simple_default_expression = true:suggestion
138+
csharp_style_deconstructed_variable_declaration = false:suggestion
139+
csharp_style_inlined_variable_declaration = true:suggestion
140+
csharp_style_pattern_local_over_anonymous_function = true:suggestion
141+
csharp_style_prefer_index_operator = true:suggestion
142+
csharp_style_prefer_range_operator = true:suggestion
143+
csharp_style_throw_expression = true:suggestion
144+
csharp_style_unused_value_assignment_preference = discard_variable:none
145+
csharp_style_unused_value_expression_statement_preference = discard_variable:none
146+
147+
# 'using' directive preferences
148+
csharp_using_directive_placement = outside_namespace:suggestion
149+
150+
# Struct preferences
151+
csharp_style_prefer_readonly_struct = true:suggestion
152+
csharp_style_prefer_readonly_struct_member = true:suggestion
153+
154+
#### C# Formatting Rules ####
155+
156+
# New line preferences
157+
csharp_new_line_before_catch = true
158+
csharp_new_line_before_else = true
159+
csharp_new_line_before_finally = true
160+
csharp_new_line_before_members_in_anonymous_types = true
161+
csharp_new_line_before_members_in_object_initializers = true
162+
csharp_new_line_before_open_brace = all
163+
csharp_new_line_between_query_expression_clauses = true
164+
csharp_style_allow_embedded_statements_on_same_line_experimental = false:error
165+
csharp_style_allow_blank_lines_between_consecutive_braces_experimental = false:error
166+
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true:silent
167+
csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental = true:silent
168+
csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = true:silent
169+
170+
# Indentation preferences
171+
csharp_indent_block_contents = true
172+
csharp_indent_braces = false
173+
csharp_indent_case_contents = true
174+
csharp_indent_case_contents_when_block = true
175+
csharp_indent_labels = one_less_than_current
176+
csharp_indent_switch_labels = true
177+
178+
# Space preferences
179+
csharp_space_after_cast = false
180+
csharp_space_after_colon_in_inheritance_clause = true
181+
csharp_space_after_comma = true
182+
csharp_space_after_dot = false
183+
csharp_space_after_keywords_in_control_flow_statements = true
184+
csharp_space_after_semicolon_in_for_statement = true
185+
csharp_space_around_binary_operators = before_and_after
186+
csharp_space_around_declaration_statements = false
187+
csharp_space_before_colon_in_inheritance_clause = true
188+
csharp_space_before_comma = false
189+
csharp_space_before_dot = false
190+
csharp_space_before_open_square_brackets = false
191+
csharp_space_before_semicolon_in_for_statement = false
192+
csharp_space_between_empty_square_brackets = false
193+
csharp_space_between_method_call_empty_parameter_list_parentheses = false
194+
csharp_space_between_method_call_name_and_opening_parenthesis = false
195+
csharp_space_between_method_call_parameter_list_parentheses = false
196+
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
197+
csharp_space_between_method_declaration_name_and_open_parenthesis = false
198+
csharp_space_between_method_declaration_parameter_list_parentheses = false
199+
csharp_space_between_parentheses = false
200+
csharp_space_between_square_brackets = false
201+
202+
# Wrapping preferences
203+
csharp_preserve_single_line_blocks = true
204+
csharp_preserve_single_line_statements = true
205+
csharp_style_prefer_utf8_string_literals = true:suggestion
206+
207+
#### Naming styles ####
208+
209+
# Naming rules
210+
211+
dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
212+
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
213+
dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
214+
215+
dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
216+
dotnet_naming_rule.types_should_be_pascal_case.symbols = types
217+
dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
218+
219+
dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion
220+
dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
221+
dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
222+
223+
dotnet_naming_rule.constant_fields_should_be_upper_case.severity = suggestion
224+
dotnet_naming_rule.constant_fields_should_be_upper_case.symbols = constant_fields
225+
dotnet_naming_rule.constant_fields_should_be_upper_case.style = pascal_case
226+
227+
dotnet_naming_symbols.constant_fields.applicable_kinds = field
228+
dotnet_naming_symbols.constant_fields.applicable_accessibilities = *
229+
dotnet_naming_symbols.constant_fields.required_modifiers = const
230+
231+
dotnet_naming_rule.private_or_internal_field_should_be_camel_case.severity = suggestion
232+
dotnet_naming_rule.private_or_internal_field_should_be_camel_case.symbols = private_or_internal_field
233+
dotnet_naming_rule.private_or_internal_field_should_be_camel_case.style = camel_case
234+
235+
dotnet_naming_rule.method_should_be_pascal_case.severity = suggestion
236+
dotnet_naming_rule.method_should_be_pascal_case.symbols = method
237+
dotnet_naming_rule.method_should_be_pascal_case.style = pascal_case
238+
239+
dotnet_naming_rule.async_method_should_be_ends_with_async.severity = suggestion
240+
dotnet_naming_rule.async_method_should_be_ends_with_async.symbols = async_method
241+
dotnet_naming_rule.async_method_should_be_ends_with_async.style = ends_with_async
242+
243+
# Symbol specifications
244+
245+
dotnet_naming_symbols.interface.applicable_kinds = interface
246+
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
247+
dotnet_naming_symbols.interface.required_modifiers =
248+
249+
dotnet_naming_symbols.method.applicable_kinds = method
250+
dotnet_naming_symbols.method.applicable_accessibilities = public
251+
dotnet_naming_symbols.method.required_modifiers =
252+
253+
dotnet_naming_symbols.private_or_internal_field.applicable_kinds = field
254+
dotnet_naming_symbols.private_or_internal_field.applicable_accessibilities = internal, private, private_protected
255+
dotnet_naming_symbols.private_or_internal_field.required_modifiers =
256+
257+
dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
258+
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
259+
dotnet_naming_symbols.types.required_modifiers =
260+
261+
dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
262+
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
263+
dotnet_naming_symbols.non_field_members.required_modifiers =
264+
265+
dotnet_naming_symbols.async_method.applicable_kinds = method
266+
dotnet_naming_symbols.async_method.applicable_accessibilities = *
267+
dotnet_naming_symbols.async_method.required_modifiers = async
268+
269+
# Naming styles
270+
271+
dotnet_naming_style.pascal_case.required_prefix =
272+
dotnet_naming_style.pascal_case.required_suffix =
273+
dotnet_naming_style.pascal_case.word_separator =
274+
dotnet_naming_style.pascal_case.capitalization = pascal_case
275+
276+
dotnet_naming_style.begins_with_i.required_prefix = I
277+
dotnet_naming_style.begins_with_i.required_suffix =
278+
dotnet_naming_style.begins_with_i.word_separator =
279+
dotnet_naming_style.begins_with_i.capitalization = pascal_case
280+
281+
dotnet_naming_style.camel_case.required_prefix =
282+
dotnet_naming_style.camel_case.required_suffix =
283+
dotnet_naming_style.camel_case.word_separator =
284+
dotnet_naming_style.camel_case.capitalization = camel_case
285+
286+
dotnet_naming_style.ends_with_async.required_prefix =
287+
dotnet_naming_style.ends_with_async.required_suffix = Async
288+
dotnet_naming_style.ends_with_async.word_separator =
289+
dotnet_naming_style.ends_with_async.capitalization = pascal_case
290+
291+
# IDE0058: Expression value is never used
292+
dotnet_diagnostic.IDE0058.severity = none
293+
294+
# IDE0010: Add missing cases
295+
dotnet_diagnostic.IDE0010.severity = none
296+
297+
# IDE0072: Add missing cases
298+
dotnet_diagnostic.IDE0072.severity = none

.github/workflows/linter.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Lint Code Base
2+
3+
#############################
4+
# Start the job on all push #
5+
#############################
6+
on:
7+
push:
8+
branches-ignore: [ master ]
9+
# Remove the line above to run when pushing to master
10+
paths: [ 'src/**' ]
11+
pull_request:
12+
branches: [ master, develop ]
13+
paths: [ 'src/**' ]
14+
workflow_dispatch:
15+
16+
###############
17+
# Set the Job #
18+
###############
19+
jobs:
20+
build:
21+
# Name the Job
22+
name: Lint Code Base
23+
# Set the agent to run on
24+
runs-on: ubuntu-latest
25+
26+
##################
27+
# Load all steps #
28+
##################
29+
steps:
30+
##########################
31+
# Checkout the code base #
32+
##########################
33+
- name: Checkout Code
34+
uses: actions/checkout@v3
35+
with:
36+
# Full git history is needed to get a proper list of changed files within `super-linter`
37+
fetch-depth: 0
38+
39+
################################
40+
# Run Linter against code base #
41+
################################
42+
- name: Lint Code Base
43+
uses: github/super-linter@v4
44+
env:
45+
LINTER_RULES_PATH: '.'
46+
EDITORCONFIG_FILE_NAME: '.editorconfig'
47+
VALIDATE_ALL_CODEBASE: false
48+
VALIDATE_CSHARP: true
49+
DEFAULT_BRANCH: master
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)