Skip to content

Commit bf3d9ea

Browse files
authored
Merge pull request #28 from nils-a/feature/GH-21
(#21) Implemented suggested Changes from Cake.Recipe update 2.x
2 parents c217c94 + 41312fd commit bf3d9ea

17 files changed

+463
-180
lines changed

.editorconfig

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ root = true
55

66
[*]
77
end_of_line = CRLF
8+
trim_trailing_whitespace = true
89

9-
[*.ps1]
10-
indent_style = space
11-
indent_size = 4
10+
[*.md]
11+
trim_trailing_whitespace = false
1212

13-
[*.cs]
13+
[*.{bat,ps1}]
14+
charset = utf-8-bom
15+
end_of_line = crlf
1416
indent_style = space
1517
indent_size = 4
1618

@@ -20,4 +22,4 @@ indent_size = 4
2022

2123
[*.js]
2224
indent_style = tab
23-
indent_size = 2
25+
indent_size = 2

Source/.editorconfig

Lines changed: 241 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,241 @@
1+
2+
# This may not be needed, but kept for compatibility with VS
3+
[*.{sln,csproj}]
4+
end_of_line = crlf
5+
indent_size = 2
6+
7+
# C# files
8+
[*.cs]
9+
10+
#### Core EditorConfig Options ####
11+
12+
# Indentation and spacing
13+
indent_size = 4
14+
indent_style = space
15+
tab_width = 4
16+
17+
# New line preferences
18+
end_of_line = crlf
19+
insert_final_newline = true
20+
21+
#### .NET Coding Conventions ####
22+
23+
# Organize usings
24+
dotnet_separate_import_directive_groups = true
25+
dotnet_sort_system_directives_first = true
26+
file_header_template = unset
27+
28+
# this. and Me. preferences
29+
dotnet_style_qualification_for_event = false:warning
30+
dotnet_style_qualification_for_field = false:warning
31+
dotnet_style_qualification_for_method = false:warning
32+
dotnet_style_qualification_for_property = false:warning
33+
34+
# Language keywords vs BCL types preferences
35+
dotnet_style_predefined_type_for_locals_parameters_members = true:warning
36+
dotnet_style_predefined_type_for_member_access = true:warning
37+
38+
# Parentheses preferences
39+
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
40+
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
41+
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
42+
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
43+
44+
# Modifier preferences
45+
dotnet_style_require_accessibility_modifiers = for_non_interface_members:warning
46+
47+
# Expression-level preferences
48+
dotnet_style_coalesce_expression = true:suggestion
49+
dotnet_style_collection_initializer = true:suggestion
50+
dotnet_style_explicit_tuple_names = true:suggestion
51+
dotnet_style_null_propagation = true:suggestion
52+
dotnet_style_object_initializer = true:suggestion
53+
dotnet_style_operator_placement_when_wrapping = beginning_of_line
54+
dotnet_style_prefer_auto_properties = true:silent
55+
dotnet_style_prefer_compound_assignment = true:suggestion
56+
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
57+
dotnet_style_prefer_conditional_expression_over_return = true:silent
58+
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
59+
dotnet_style_prefer_inferred_tuple_names = true:suggestion
60+
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
61+
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
62+
dotnet_style_prefer_simplified_interpolation = true:suggestion
63+
64+
# Field preferences
65+
dotnet_style_readonly_field = true:suggestion
66+
67+
# Parameter preferences
68+
dotnet_code_quality_unused_parameters = all:suggestion
69+
70+
#### C# Coding Conventions ####
71+
72+
# var preferences
73+
csharp_style_var_elsewhere = false:silent
74+
csharp_style_var_for_built_in_types = false:silent
75+
csharp_style_var_when_type_is_apparent = false:silent
76+
77+
# Expression-bodied members
78+
csharp_style_expression_bodied_accessors = true:silent
79+
csharp_style_expression_bodied_constructors = false:silent
80+
csharp_style_expression_bodied_indexers = true:silent
81+
csharp_style_expression_bodied_lambdas = true:silent
82+
csharp_style_expression_bodied_local_functions = false:silent
83+
csharp_style_expression_bodied_methods = false:silent
84+
csharp_style_expression_bodied_operators = false:silent
85+
csharp_style_expression_bodied_properties = true:silent
86+
87+
# Pattern matching preferences
88+
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
89+
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
90+
csharp_style_prefer_switch_expression = true:suggestion
91+
92+
# Null-checking preferences
93+
csharp_style_conditional_delegate_call = true:suggestion
94+
95+
# Modifier preferences
96+
csharp_prefer_static_local_function = true:suggestion
97+
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:silent
98+
99+
# Code-block preferences
100+
csharp_prefer_braces = true:silent
101+
csharp_prefer_simple_using_statement = true:suggestion
102+
103+
# Expression-level preferences
104+
csharp_prefer_simple_default_expression = true:suggestion
105+
csharp_style_deconstructed_variable_declaration = true:suggestion
106+
csharp_style_inlined_variable_declaration = true:suggestion
107+
csharp_style_pattern_local_over_anonymous_function = true:suggestion
108+
csharp_style_prefer_index_operator = true:suggestion
109+
csharp_style_prefer_range_operator = true:suggestion
110+
csharp_style_throw_expression = true:suggestion
111+
csharp_style_unused_value_assignment_preference = discard_variable:suggestion
112+
csharp_style_unused_value_expression_statement_preference = discard_variable:silent
113+
114+
# 'using' directive preferences
115+
csharp_using_directive_placement = outside_namespace:warning
116+
117+
#### C# Formatting Rules ####
118+
119+
# New line preferences
120+
csharp_new_line_before_catch = true
121+
csharp_new_line_before_else = true
122+
csharp_new_line_before_finally = true
123+
csharp_new_line_before_members_in_anonymous_types = true
124+
csharp_new_line_before_members_in_object_initializers = true
125+
csharp_new_line_before_open_brace = all
126+
csharp_new_line_between_query_expression_clauses = true
127+
128+
# Indentation preferences
129+
csharp_indent_block_contents = true
130+
csharp_indent_braces = false
131+
csharp_indent_case_contents = true
132+
csharp_indent_case_contents_when_block = false
133+
csharp_indent_labels = flush_left
134+
csharp_indent_switch_labels = true
135+
136+
# Space preferences
137+
csharp_space_after_cast = false
138+
csharp_space_after_colon_in_inheritance_clause = true
139+
csharp_space_after_comma = true
140+
csharp_space_after_dot = false
141+
csharp_space_after_keywords_in_control_flow_statements = true
142+
csharp_space_after_semicolon_in_for_statement = true
143+
csharp_space_around_binary_operators = before_and_after
144+
csharp_space_around_declaration_statements = false
145+
csharp_space_before_colon_in_inheritance_clause = true
146+
csharp_space_before_comma = false
147+
csharp_space_before_dot = false
148+
csharp_space_before_open_square_brackets = false
149+
csharp_space_before_semicolon_in_for_statement = false
150+
csharp_space_between_empty_square_brackets = false
151+
csharp_space_between_method_call_empty_parameter_list_parentheses = false
152+
csharp_space_between_method_call_name_and_opening_parenthesis = false
153+
csharp_space_between_method_call_parameter_list_parentheses = false
154+
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
155+
csharp_space_between_method_declaration_name_and_open_parenthesis = false
156+
csharp_space_between_method_declaration_parameter_list_parentheses = false
157+
csharp_space_between_parentheses = false
158+
csharp_space_between_square_brackets = false
159+
160+
# Wrapping preferences
161+
csharp_preserve_single_line_blocks = true
162+
csharp_preserve_single_line_statements = false
163+
164+
#### Naming styles ####
165+
166+
# Naming rules
167+
168+
dotnet_naming_rule.interface_should_be_begins_with_i.severity = warning
169+
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
170+
dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
171+
172+
dotnet_naming_rule.types_should_be_pascal_case.severity = warning
173+
dotnet_naming_rule.types_should_be_pascal_case.symbols = types
174+
dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
175+
176+
dotnet_naming_rule.method_should_be_pascal_case.severity = warning
177+
dotnet_naming_rule.method_should_be_pascal_case.symbols = method
178+
dotnet_naming_rule.method_should_be_pascal_case.style = pascal_case
179+
180+
dotnet_naming_rule.public_or_protected_field_should_be_pascal_case.severity = warning
181+
dotnet_naming_rule.public_or_protected_field_should_be_pascal_case.symbols = public_or_protected_field
182+
dotnet_naming_rule.public_or_protected_field_should_be_pascal_case.style = pascal_case
183+
184+
dotnet_naming_rule.private_or_internal_static_field_should_be_pascal_case.severity = warning
185+
dotnet_naming_rule.private_or_internal_static_field_should_be_pascal_case.symbols = private_or_internal_static_field
186+
dotnet_naming_rule.private_or_internal_static_field_should_be_pascal_case.style = pascal_case
187+
188+
dotnet_naming_rule.private_or_internal_field_should_be_camelcase_with_underscore.severity = warning
189+
dotnet_naming_rule.private_or_internal_field_should_be_camelcase_with_underscore.symbols = private_or_internal_field
190+
dotnet_naming_rule.private_or_internal_field_should_be_camelcase_with_underscore.style = camelcase_with_underscore
191+
192+
dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = warning
193+
dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
194+
dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
195+
196+
# Symbol specifications
197+
198+
dotnet_naming_symbols.interface.applicable_kinds = interface
199+
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
200+
dotnet_naming_symbols.interface.required_modifiers =
201+
202+
dotnet_naming_symbols.method.applicable_kinds = method
203+
dotnet_naming_symbols.method.applicable_accessibilities = public
204+
dotnet_naming_symbols.method.required_modifiers =
205+
206+
dotnet_naming_symbols.public_or_protected_field.applicable_kinds = field
207+
dotnet_naming_symbols.public_or_protected_field.applicable_accessibilities = public, protected
208+
dotnet_naming_symbols.public_or_protected_field.required_modifiers =
209+
210+
dotnet_naming_symbols.private_or_internal_field.applicable_kinds = field
211+
dotnet_naming_symbols.private_or_internal_field.applicable_accessibilities = internal, private, private_protected
212+
dotnet_naming_symbols.private_or_internal_field.required_modifiers =
213+
214+
dotnet_naming_symbols.private_or_internal_static_field.applicable_kinds = field
215+
dotnet_naming_symbols.private_or_internal_static_field.applicable_accessibilities = internal, private, private_protected
216+
dotnet_naming_symbols.private_or_internal_static_field.required_modifiers = static
217+
218+
dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
219+
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
220+
dotnet_naming_symbols.types.required_modifiers =
221+
222+
dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
223+
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
224+
dotnet_naming_symbols.non_field_members.required_modifiers =
225+
226+
# Naming styles
227+
228+
dotnet_naming_style.pascal_case.required_prefix =
229+
dotnet_naming_style.pascal_case.required_suffix =
230+
dotnet_naming_style.pascal_case.word_separator =
231+
dotnet_naming_style.pascal_case.capitalization = pascal_case
232+
233+
dotnet_naming_style.begins_with_i.required_prefix = I
234+
dotnet_naming_style.begins_with_i.required_suffix =
235+
dotnet_naming_style.begins_with_i.word_separator =
236+
dotnet_naming_style.begins_with_i.capitalization = pascal_case
237+
238+
dotnet_naming_style.camelcase_with_underscore.required_prefix = _
239+
dotnet_naming_style.camelcase_with_underscore.required_suffix =
240+
dotnet_naming_style.camelcase_with_underscore.word_separator =
241+
dotnet_naming_style.camelcase_with_underscore.capitalization = camel_case
Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,28 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
2-
3-
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
5-
</PropertyGroup>
6-
7-
<ItemGroup>
8-
<PackageReference Include="Cake.Core" Version="0.33.0">
9-
<PrivateAssets>all</PrivateAssets>
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>netcoreapp3.1</TargetFramework>
5+
</PropertyGroup>
6+
7+
<ItemGroup>
8+
<PackageReference Include="Cake.Core" Version="$(CakeVersion)">
9+
<PrivateAssets>all</PrivateAssets>
10+
</PackageReference>
11+
<PackageReference Include="Cake.Testing" Version="$(CakeVersion)">
12+
<PrivateAssets>all</PrivateAssets>
1013
</PackageReference>
11-
<PackageReference Include="Cake.Testing" Version="0.33.0">
12-
<PrivateAssets>all</PrivateAssets>
14+
<PackageReference Include="coverlet.msbuild" Version="6.0.2">
15+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
16+
<PrivateAssets>all</PrivateAssets>
1317
</PackageReference>
1418
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.6.0" />
1519
<PackageReference Include="xunit" Version="2.3.1" />
16-
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
17-
<PackageReference Include="NSubstitute" Version="3.1.0" />
18-
</ItemGroup>
19-
20-
<ItemGroup>
21-
<ProjectReference Include="..\Cake.Chocolatey.Module\Cake.Chocolatey.Module.csproj" />
22-
</ItemGroup>
23-
24-
</Project>
20+
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
21+
<PackageReference Include="NSubstitute" Version="3.1.0" />
22+
</ItemGroup>
23+
24+
<ItemGroup>
25+
<ProjectReference Include="..\Cake.Chocolatey.Module\Cake.Chocolatey.Module.csproj" />
26+
</ItemGroup>
27+
28+
</Project>

Source/Cake.Chocolatey.Module.Tests/packages.config

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)