Skip to content

Commit f4dfc21

Browse files
committed
🖆 Apply kzu/oss template via dotnet-file
1 parent d7503af commit f4dfc21

File tree

122 files changed

+759
-460
lines changed

Some content is hidden

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

122 files changed

+759
-460
lines changed

.editorconfig

Lines changed: 50 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -1,153 +1,89 @@
1-
# editorconfig.org
1+
# EditorConfig is awesome:http://EditorConfig.org
22

33
# top-most EditorConfig file
44
root = true
55

6-
# Default settings:
7-
# A newline ending every file
8-
# Use 4 spaces as indentation
6+
# Don't use tabs for indentation.
97
[*]
10-
insert_final_newline = true
118
indent_style = space
129
# (Please don't specify an indent_size here; that has too many unintended consequences.)
1310

14-
1511
# Code files
1612
[*.{cs,csx,vb,vbx}]
1713
indent_size = 4
1814

19-
# XML project files
20-
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
21-
indent_size = 2
22-
23-
# XML config files
24-
[*.{props,targets,ruleset,stylecop,xml,config,nuspec,resx,vsixmanifest,vsct}]
25-
indent_size = 2
26-
27-
# JSON files
28-
[*.json]
15+
# Xml project files
16+
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj,msbuildproj,props,targets}]
2917
indent_size = 2
3018

31-
# Powershell files
32-
[*.ps1]
19+
# Xml config files
20+
[*.{ruleset,config,nuspec,resx,vsixmanifest,vsct}]
3321
indent_size = 2
3422

35-
# Shell script files
36-
[*.sh]
37-
end_of_line = lf
23+
# YAML files
24+
[*.{yaml,yml}]
3825
indent_size = 2
3926

40-
# Yaml devops files
41-
[*.{yml,yaml}]
27+
# JSON files
28+
[*.json]
4229
indent_size = 2
4330

44-
# Shell scripts
45-
[*.sh]
46-
end_of_line = lf
47-
[*.{cmd, bat}]
48-
end_of_line = crlf
49-
50-
51-
# C# files
52-
[*.cs]
53-
# New line preferences
54-
csharp_new_line_before_open_brace = all
55-
csharp_new_line_before_else = true
56-
csharp_new_line_before_catch = true
57-
csharp_new_line_before_finally = true
58-
csharp_new_line_before_members_in_object_initializers = true
59-
csharp_new_line_before_members_in_anonymous_types = true
60-
csharp_new_line_within_query_expression_clauses = true
61-
62-
# Indentation preferences
63-
csharp_indent_block_contents = true
64-
csharp_indent_braces = false
65-
csharp_indent_case_contents = true
66-
csharp_indent_switch_labels = true
67-
csharp_indent_labels = flush_left
68-
69-
# avoid this. unless absolutely necessary
31+
# Dotnet code style settings:
32+
[*.{cs,vb}]
33+
# Sort using and Import directives with System.* appearing first
34+
dotnet_sort_system_directives_first = true
35+
# Avoid "this." and "Me." if not necessary
7036
dotnet_style_qualification_for_field = false:suggestion
7137
dotnet_style_qualification_for_property = false:suggestion
7238
dotnet_style_qualification_for_method = false:suggestion
7339
dotnet_style_qualification_for_event = false:suggestion
7440

75-
# Prefer "var" everywhere
76-
csharp_style_var_for_built_in_types = true:suggestion
77-
csharp_style_var_when_type_is_apparent = true:suggestion
78-
csharp_style_var_elsewhere = true:suggestion
79-
80-
# use language keywords instead of BCL types
41+
# Use language keywords instead of framework type names for type references
8142
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
8243
dotnet_style_predefined_type_for_member_access = true:suggestion
8344

84-
# name all constant fields using PascalCase
85-
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
86-
dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
87-
dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
45+
# Suggest more modern language features when available
46+
dotnet_style_object_initializer = true:suggestion
47+
dotnet_style_collection_initializer = true:suggestion
48+
dotnet_style_coalesce_expression = true:suggestion
49+
dotnet_style_null_propagation = true:suggestion
50+
dotnet_style_explicit_tuple_names = true:suggestion
8851

89-
dotnet_naming_symbols.constant_fields.applicable_kinds = field
90-
dotnet_naming_symbols.constant_fields.required_modifiers = const
52+
# CSharp code style settings:
9153

92-
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
54+
# IDE0040: Add accessibility modifiers
55+
dotnet_style_require_accessibility_modifiers = omit_if_default:error
9356

94-
# internal and private fields should be _camelCase
95-
dotnet_naming_rule.camel_case_for_private_internal_fields.severity = suggestion
96-
dotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_internal_fields
97-
dotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case
57+
# IDE0040: Add accessibility modifiers
58+
dotnet_diagnostic.IDE0040.severity = error
9859

99-
dotnet_naming_symbols.private_internal_fields.applicable_kinds = field
100-
dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal
60+
[*.cs]
61+
# Prefer "var" everywhere
62+
csharp_style_var_for_built_in_types = true:suggestion
63+
csharp_style_var_when_type_is_apparent = true:suggestion
64+
csharp_style_var_elsewhere = true:suggestion
10165

102-
# Code style defaults
103-
dotnet_sort_system_directives_first = true
104-
csharp_preserve_single_line_blocks = true
105-
csharp_preserve_single_line_statements = false
66+
# Prefer method-like constructs to have an expression-body
67+
csharp_style_expression_bodied_methods = true:none
68+
csharp_style_expression_bodied_constructors = true:none
69+
csharp_style_expression_bodied_operators = true:none
10670

107-
# Expression-level preferences
108-
dotnet_style_object_initializer = true:suggestion
109-
dotnet_style_collection_initializer = true:suggestion
110-
dotnet_style_explicit_tuple_names = true:suggestion
111-
dotnet_style_coalesce_expression = true:suggestion
112-
dotnet_style_null_propagation = true:suggestion
71+
# Prefer property-like constructs to have an expression-body
72+
csharp_style_expression_bodied_properties = true:none
73+
csharp_style_expression_bodied_indexers = true:none
74+
csharp_style_expression_bodied_accessors = true:none
11375

114-
# Expression-bodied members
115-
csharp_style_expression_bodied_methods = when_on_single_line:suggestion
116-
csharp_style_expression_bodied_constructors = when_on_single_line:suggestion
117-
csharp_style_expression_bodied_operators = when_on_single_line:suggestion
118-
csharp_style_expression_bodied_properties = when_on_single_line:suggestion
119-
csharp_style_expression_bodied_indexers = when_on_single_line:suggestion
120-
csharp_style_expression_bodied_accessors = when_on_single_line:suggestion
121-
122-
# Pattern matching
123-
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
124-
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
76+
# Suggest more modern language features when available
77+
csharp_style_pattern_matching_over_is_with_cast_check = true:error
78+
csharp_style_pattern_matching_over_as_with_null_check = true:error
12579
csharp_style_inlined_variable_declaration = true:suggestion
126-
127-
# Null checking preferences
12880
csharp_style_throw_expression = true:suggestion
12981
csharp_style_conditional_delegate_call = true:suggestion
13082

131-
# Space preferences
132-
csharp_space_after_cast = false
133-
csharp_space_after_colon_in_inheritance_clause = true
134-
csharp_space_after_comma = true
135-
csharp_space_after_dot = false
136-
csharp_space_after_keywords_in_control_flow_statements = true
137-
csharp_space_after_semicolon_in_for_statement = true
138-
csharp_space_around_binary_operators = before_and_after
139-
csharp_space_around_declaration_statements = do_not_ignore
140-
csharp_space_before_colon_in_inheritance_clause = true
141-
csharp_space_before_comma = false
142-
csharp_space_before_dot = false
143-
csharp_space_before_open_square_brackets = false
144-
csharp_space_before_semicolon_in_for_statement = false
145-
csharp_space_between_empty_square_brackets = false
146-
csharp_space_between_method_call_empty_parameter_list_parentheses = false
147-
csharp_space_between_method_call_name_and_opening_parenthesis = false
148-
csharp_space_between_method_call_parameter_list_parentheses = false
149-
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
150-
csharp_space_between_method_declaration_name_and_open_parenthesis = false
151-
csharp_space_between_method_declaration_parameter_list_parentheses = false
152-
csharp_space_between_parentheses = false
153-
csharp_space_between_square_brackets = false
83+
# Newline settings
84+
csharp_new_line_before_open_brace = all
85+
csharp_new_line_before_else = true
86+
csharp_new_line_before_catch = true
87+
csharp_new_line_before_finally = true
88+
csharp_new_line_before_members_in_object_initializers = true
89+
csharp_new_line_before_members_in_anonymous_types = true

.gitattributes

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
# This file is understood by git 1.7.2 and higher. Everyone should
2-
# be on this version by now.
3-
41
# sln, csproj files (and friends) are always CRLF, even on linux
52
*.sln text eol=crlf
63
*.proj text eol=crlf
4+
*.csproj text eol=crlf
75

86
# These are windows specific files which we may as well ensure are
97
# always crlf on checkout
@@ -16,15 +14,11 @@
1614
*.config text
1715
*.h text
1816
*.cs text
19-
*.csproj text
2017
*.md text
2118
*.tt text
2219
*.txt text
23-
*.vspackage text
24-
*.vspackage.diagram text
2520

2621
# Some must always be checked out as lf so enforce that for those files
2722
# If these are not lf then bash/cygwin on windows will not be able to
2823
# excute the files
29-
*.sh text eol=lf
30-
24+
*.sh text eol=lf

.github/FUNDING.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
custom: https://paypal.me/kzu
2+
patreon: danielkzu
3+
open_collective: kzu
4+
liberapay: kzu

.github/ISSUE_TEMPLATE/bug.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
name: Bug Report
3+
about: Create a report to help us fix a problem.
4+
title: ''
5+
labels: 'bug'
6+
assignees: ''
7+
---
8+
9+
## Describe the Bug
10+
11+
<!-- A clear and concise description of what the bug is. -->
12+
13+
## Steps to Reproduce
14+
15+
<!-- Tell us how to reproduce the issue. Ideally provide a failing unit test. -->
16+
17+
```c#
18+
public class ReproTest
19+
{
20+
[Fact]
21+
public void Repro()
22+
{
23+
// arrange
24+
25+
// act
26+
27+
// assert
28+
}
29+
}
30+
```
31+
32+
## Expected Behavior
33+
34+
<!-- Describe what you expected to happen. -->
35+
36+
## Exception with Stack Trace
37+
38+
<!-- If you see an exception, put the WHOLE THING here. -->
39+
40+
```text
41+
Put the exception with stack trace here.
42+
```
43+
44+
## Version Info
45+
46+
<!-- Main project version and other relevant dependencies you are using. -->
47+
48+
## Additional Info
49+
50+
<!-- Add any other context about the problem here. -->

.github/ISSUE_TEMPLATE/feature.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: Feature Request
3+
about: Suggest an idea to make the project better.
4+
title: ''
5+
labels: 'enhancement'
6+
assignees: ''
7+
---
8+
9+
## Problem Statement
10+
11+
<!--
12+
A clear and concise description of what the problem is that this feature would
13+
solve, e.g.: It's really difficult to [...]
14+
-->
15+
16+
## Desired Solution
17+
18+
<!--
19+
A clear and concise description of what you want to happen. If this is an API
20+
change or improvement, include some pseudocode to illustrate how you think it
21+
should work.
22+
-->
23+
24+
## Alternatives You've Considered
25+
26+
<!--
27+
A clear and concise description of any alternative solutions or features
28+
you've considered.
29+
-->
30+
31+
## Additional Context
32+
33+
<!-- Add any other context or information about the feature request here. -->

.github/dependabot.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Please see the documentation for all configuration options:
2+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
3+
4+
version: 2
5+
updates:
6+
- package-ecosystem: nuget
7+
directory: /
8+
schedule:
9+
interval: weekly

0 commit comments

Comments
 (0)