Skip to content

Commit 0c86889

Browse files
committed
initial
0 parents  commit 0c86889

File tree

175 files changed

+3650
-0
lines changed

Some content is hidden

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

175 files changed

+3650
-0
lines changed

.editorconfig

Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_style = space
7+
indent_size = 4
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
11+
# XML project files
12+
[*.{csproj,fsproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
13+
indent_size = 2
14+
15+
# XML config files
16+
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}]
17+
indent_size = 2
18+
19+
[*.{cs,csx}]
20+
max_line_length = 120
21+
dotnet_sort_system_directives_first = true
22+
# this. preferences
23+
dotnet_style_qualification_for_field = false:suggestion
24+
dotnet_style_qualification_for_property = false:suggestion
25+
dotnet_style_qualification_for_method = false:suggestion
26+
dotnet_style_qualification_for_event = false:suggestion
27+
# Language keywords vs BCL types preferences
28+
dotnet_style_predefined_type_for_locals_parameters_members = true:error
29+
dotnet_style_predefined_type_for_member_access = true:error
30+
# Parentheses preferences
31+
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:suggestion
32+
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:suggestion
33+
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:suggestion
34+
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:suggestion
35+
36+
# Modifier preferences
37+
dotnet_style_require_accessibility_modifiers = omit_if_default:warning
38+
dotnet_style_readonly_field = true:suggestion
39+
40+
# Expression-level preferences
41+
dotnet_style_object_initializer = true:suggestion
42+
dotnet_style_collection_initializer = true:suggestion
43+
dotnet_style_explicit_tuple_names = true:suggestion
44+
dotnet_style_null_propagation = true:suggestion
45+
dotnet_style_coalesce_expression = true:suggestion
46+
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning
47+
dotnet_style_prefer_inferred_tuple_names = true:suggestion
48+
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
49+
dotnet_style_prefer_auto_properties = true:silent
50+
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
51+
dotnet_style_prefer_conditional_expression_over_return = true:silent
52+
53+
# Style Definitions
54+
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
55+
dotnet_naming_style.camel_case_style.capitalization = camel_case
56+
57+
# constant case preferences
58+
dotnet_naming_symbols.constant_fields.applicable_kinds = field
59+
dotnet_naming_symbols.constant_fields.applicable_accessibilities = *
60+
dotnet_naming_symbols.constant_fields.required_modifiers = const
61+
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+
66+
# fields case preferences
67+
dotnet_naming_symbols.private_field_symbols.applicable_kinds = field
68+
dotnet_naming_symbols.private_field_symbols.applicable_accessibilities = private
69+
70+
dotnet_naming_rule.private_field_symbols_should_be_camel_case.symbols = private_field_symbols
71+
dotnet_naming_rule.private_field_symbols_should_be_camel_case.severity = warning
72+
dotnet_naming_rule.private_field_symbols_should_be_camel_case.style = camel_case_style
73+
74+
dotnet_naming_symbols.protected_field_symbols.applicable_kinds = field, property
75+
dotnet_naming_symbols.protected_field_symbols.applicable_accessibilities = protected
76+
dotnet_naming_rule.protected_field_symbols_should_be_camel_case.symbols = protected_field_symbols
77+
dotnet_naming_rule.protected_field_symbols_should_be_camel_case.severity = suggestion
78+
dotnet_naming_rule.protected_field_symbols_should_be_camel_case.style = camel_case_style
79+
80+
# var preferences
81+
csharp_style_var_for_built_in_types = true:silent
82+
csharp_style_var_when_type_is_apparent = true:silent
83+
csharp_style_var_elsewhere = true:silent
84+
85+
# Expression-bodied members
86+
csharp_style_expression_bodied_methods = true:suggestion
87+
csharp_style_expression_bodied_constructors = true:suggestion
88+
csharp_style_expression_bodied_operators = true:suggestion
89+
csharp_style_expression_bodied_properties = true:suggestion
90+
csharp_style_expression_bodied_indexers = true:suggestion
91+
csharp_style_expression_bodied_accessors = true:suggestion
92+
csharp_style_expression_bodied_lambdas = true:suggestion
93+
csharp_style_expression_bodied_local_functions = true:suggestion
94+
95+
# Pattern matching preferences
96+
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
97+
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
98+
99+
# Null-checking preferences
100+
csharp_style_throw_expression = true:suggestion
101+
csharp_style_conditional_delegate_call = true:suggestion
102+
103+
# Modifier preferences
104+
csharp_preferred_modifier_order = public, private, protected, internal, static, extern, new, virtual, abstract, sealed, override, readonly, unsafe, volatile, async:suggestion
105+
106+
# Expression-level preferences
107+
csharp_prefer_braces = false
108+
csharp_style_deconstructed_variable_declaration = true:suggestion
109+
csharp_prefer_simple_default_expression = true:suggestion
110+
csharp_style_inlined_variable_declaration = true:suggestion
111+
112+
# New line preferences
113+
csharp_new_line_before_open_brace = all
114+
csharp_new_line_before_else = true
115+
csharp_new_line_before_catch = true
116+
csharp_new_line_before_finally = true
117+
csharp_new_line_before_members_in_object_initializers = true
118+
csharp_new_line_before_members_in_anonymous_types = true
119+
csharp_new_line_between_query_expression_clauses = true
120+
121+
# Indentation preferences
122+
csharp_indent_case_contents = true
123+
csharp_indent_switch_labels = true
124+
csharp_indent_labels = flush_left
125+
126+
# Space preferences
127+
csharp_space_after_cast = false
128+
csharp_space_after_keywords_in_control_flow_statements = true
129+
csharp_space_between_method_call_parameter_list_parentheses = false
130+
csharp_space_between_method_declaration_parameter_list_parentheses = false
131+
csharp_space_between_parentheses = false
132+
csharp_space_before_colon_in_inheritance_clause = true
133+
csharp_space_after_colon_in_inheritance_clause = true
134+
csharp_space_around_binary_operators = before_and_after
135+
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
136+
csharp_space_between_method_call_name_and_opening_parenthesis = false
137+
csharp_space_between_method_call_empty_parameter_list_parentheses = false
138+
# Wrapping preferences
139+
csharp_preserve_single_line_statements = true
140+
csharp_preserve_single_line_blocks = true
141+
142+
# Analysers
143+
## dotnet
144+
dotnet_diagnostic.IDE0011.severity = suggestion # require braces
145+
dotnet_diagnostic.IDE0005.severity = warning # Using directive is unnecessary.
146+
dotnet_diagnostic.IDE0005.severity = warning # Using directive is unnecessary.
147+
dotnet_diagnostic.CA1860.severity = silent # Prefer comparing 'Length' to 0 rather than using 'Any()'
148+
149+
## Sonar
150+
dotnet_diagnostic.S1481.severity = warning # variable never used
151+
dotnet_diagnostic.S1144.severity = suggestion # Remove the unused private constructor 'AddAuthorizationHeaderOperationFilter'.
152+
dotnet_diagnostic.S1118.severity = suggestion # Add a 'protected' constructor or the 'static' keyword to the class declaration.
153+
dotnet_diagnostic.S1075.severity = suggestion # hardcoded URIs
154+
dotnet_diagnostic.S3459.severity = suggestion # Unassigned members should be removed
155+
dotnet_diagnostic.S1104.severity = suggestion # Make this field 'private' and encapsulate it in a 'public' property.
156+
dotnet_diagnostic.S3237.severity = silent # Use the 'value' contextual keyword in this property set accessor declaration.
157+
dotnet_diagnostic.S1210.severity = silent # When implementing IComparable , you should also override , =, >, and >=.
158+
dotnet_diagnostic.S2219.severity = silent # runtime type checking should be simplified
159+
dotnet_diagnostic.S2094.severity = silent # empty class (false positive)
160+
dotnet_diagnostic.S3973.severity = silent # braces
161+
dotnet_diagnostic.S2346.severity = silent # enum None flags
162+
163+
# Resharper
164+
resharper_space_within_single_line_array_initializer_braces = true
165+
resharper_keep_existing_attribute_arrangement = true
166+
resharper_max_array_initializer_elements_on_line = 10
167+
resharper_max_initializer_elements_on_line = 1
168+
resharper_trailing_comma_in_multiline_lists = true
169+
resharper_wrap_array_initializer_style = chop_if_long
170+
resharper_empty_block_style = together_same_line

.gitattributes

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
* text=auto eol=lf
2+
3+
*.png binary
4+
*.jpg binary
5+
*.pdf binary
6+
*.exe binary
7+
*.dll binary

.github/workflows/publish.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Publish
2+
3+
on:
4+
workflow_dispatch:
5+
6+
env:
7+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
8+
DOTNET_CLI_TELEMETRY_OPTOUT: true
9+
GITHUB_ACTIONS: true
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
outputs:
15+
Version: ${{ steps.gitversion.outputs.SemVer }}
16+
CommitsSinceVersionSource: ${{ steps.gitversion.outputs.CommitsSinceVersionSource }}
17+
18+
steps:
19+
- uses: actions/checkout@v2
20+
with:
21+
fetch-depth: 0
22+
23+
- name: Install GitVersion
24+
uses: gittools/actions/gitversion/[email protected]
25+
with:
26+
versionSpec: 5.x
27+
28+
- name: Determine Version
29+
uses: gittools/actions/gitversion/[email protected]
30+
id: gitversion
31+
32+
- name: Display GitVersion outputs
33+
run: |
34+
echo "Version: ${{ steps.gitversion.outputs.SemVer }}"
35+
echo "CommitsSinceVersionSource: ${{ steps.gitversion.outputs.CommitsSinceVersionSource }}"
36+
37+
- name: Setup .NET Core
38+
uses: actions/setup-dotnet@v2
39+
with:
40+
global-json-file: global.json
41+
42+
- name: Build and Pack NuGet package
43+
run: dotnet publish src/InputDisplay --configuration Release --self-contained -p:Version='${{ steps.gitversion.outputs.SemVer }}' --output ./Publish
44+
45+
- name: Upload lib NuGet package artifact to GitHub
46+
uses: actions/upload-artifact@v2
47+
with:
48+
name: app
49+
path: ./Publish
50+
51+
release:
52+
runs-on: ubuntu-latest
53+
if: github.ref == 'refs/heads/master' && needs.build.outputs.CommitsSinceVersionSource > 0 #Only release if there has been a commit/version change
54+
needs: build
55+
56+
steps:
57+
- name: Download lib nuget package artifact
58+
uses: actions/[email protected]
59+
with:
60+
name: app
61+
62+
- name: Create Release
63+
uses: ncipollo/release-action@v1
64+
with:
65+
tag: ${{ needs.build.outputs.Version }}
66+
name: Release ${{ needs.build.outputs.Version }}
67+
artifacts: "app/*"
68+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)