Skip to content
This repository was archived by the owner on Dec 25, 2023. It is now read-only.

Commit ad63ade

Browse files
Elias Oeheneoehen
authored andcommitted
Improve Cake.Recipe build
1 parent b2ba78d commit ad63ade

File tree

9 files changed

+338
-52
lines changed

9 files changed

+338
-52
lines changed

.editorconfig

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

.vscode/settings.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"omnisharp.enableEditorConfigSupport": true,
3+
"omnisharp.enableRoslynAnalyzers": true,
4+
"[powershell]": {
5+
"files.encoding": "utf8bom"
6+
},
7+
"powershell.codeFormatting.addWhitespaceAroundPipe": true
8+
}

nuspec/nuget/Cake.Issues.InspectCode.nuspec

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

recipe.cake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ BuildParameters.SetParameters(
1010
repositoryOwner: "cake-contrib",
1111
repositoryName: "Cake.Issues.InspectCode",
1212
appVeyorAccountName: "cakecontrib",
13+
shouldRunDotNetCorePack: true,
1314
shouldGenerateDocumentation: false,
1415
shouldRunCodecov: false);
1516

src/Cake.Issues.InspectCode.sln

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,17 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 15
4-
VisualStudioVersion = 15.0.26730.8
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.30330.147
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cake.Issues.InspectCode", "Cake.Issues.InspectCode\Cake.Issues.InspectCode.csproj", "{CE99B416-2EE1-40C4-A554-4CE844B34296}"
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cake.Issues.InspectCode", "Cake.Issues.InspectCode\Cake.Issues.InspectCode.csproj", "{CE99B416-2EE1-40C4-A554-4CE844B34296}"
77
EndProject
8-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cake.Issues.InspectCode.Tests", "Cake.Issues.InspectCode.Tests\Cake.Issues.InspectCode.Tests.csproj", "{B9DD5E9C-EBD1-4FBD-B73D-21B946A72911}"
8+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cake.Issues.InspectCode.Tests", "Cake.Issues.InspectCode.Tests\Cake.Issues.InspectCode.Tests.csproj", "{B9DD5E9C-EBD1-4FBD-B73D-21B946A72911}"
99
EndProject
1010
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{F4C96A0B-F657-49DC-9644-611EF9D2202E}"
1111
ProjectSection(SolutionItems) = preProject
1212
..\recipe.cake = ..\recipe.cake
1313
EndProjectSection
1414
EndProject
15-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "nuspec", "nuspec", "{1BCE24B1-7AC2-47E0-8DFF-3C6B5A916FDE}"
16-
ProjectSection(SolutionItems) = preProject
17-
..\nuspec\nuget\Cake.Issues.InspectCode.nuspec = ..\nuspec\nuget\Cake.Issues.InspectCode.nuspec
18-
EndProjectSection
19-
EndProject
2015
Global
2116
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2217
Debug|Any CPU = Debug|Any CPU
@@ -35,9 +30,6 @@ Global
3530
GlobalSection(SolutionProperties) = preSolution
3631
HideSolutionNode = FALSE
3732
EndGlobalSection
38-
GlobalSection(NestedProjects) = preSolution
39-
{1BCE24B1-7AC2-47E0-8DFF-3C6B5A916FDE} = {F4C96A0B-F657-49DC-9644-611EF9D2202E}
40-
EndGlobalSection
4133
GlobalSection(ExtensibilityGlobals) = postSolution
4234
SolutionGuid = {01AB5641-CE0F-43CE-BD88-3C5B6BE6595B}
4335
EndGlobalSection

src/Cake.Issues.InspectCode/Cake.Issues.InspectCode.csproj

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,45 @@
77
<Authors>BBT Software AG</Authors>
88
<Company>BBT Software AG</Company>
99
<Copyright>Copyright © BBT Software AG and contributors</Copyright>
10+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
11+
<IncludeSymbols>true</IncludeSymbols>
12+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
13+
<RepositoryType>git</RepositoryType>
14+
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
1015
</PropertyGroup>
11-
16+
17+
<PropertyGroup>
18+
<!-- Properties related to packaging -->
19+
<Authors>BBT Software AG and contributors</Authors>
20+
<Copyright>Copyright © BBT Software AG and contributors</Copyright>
21+
<Description>
22+
The JetBrains Inspect Code support for the Cake.Issues addin for Cake allows you to read issues logged by JetBrains Inspect Code.
23+
24+
This addin provides the aliases for reading JetBrains Inspect Code issues and providing them to the Cake.Issues addin.
25+
It also requires the core Cake.Issues addin.
26+
27+
There are also additional addins for generating reports or posting issues to pull requests.
28+
29+
See the Project Site for an overview of the whole ecosystem of addins for working with issues in Cake scripts.
30+
</Description>
31+
<PackageIcon>icon.png</PackageIcon>
32+
<PackageIconUrl>https://cdn.jsdelivr.net/gh/cake-contrib/graphics/png/cake-contrib-medium.png</PackageIconUrl>
33+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
34+
<PackageProjectUrl>https://cakeissues.net</PackageProjectUrl>
35+
<PackageTags>Cake Script;Cake-Issues:Cake-IssueProvider;CodeAnalysis;Linting;InspectCode</PackageTags>
36+
<RepositoryUrl>https://github.com/cake-contrib/Cake.StrongNameSigner.git</RepositoryUrl>
37+
<PackageReleaseNotes>https://github.com/cake-contrib/Cake.Issues.InspectCode/releases/tag/$(Version)</PackageReleaseNotes>
38+
</PropertyGroup>
39+
1240
<PropertyGroup>
1341
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
1442
<CodeAnalysisRuleSet>..\Cake.Issues.InspectCode.ruleset</CodeAnalysisRuleSet>
1543
</PropertyGroup>
16-
44+
45+
<ItemGroup>
46+
<AdditionalFiles Include="stylecop.json" />
47+
</ItemGroup>
48+
1749
<PropertyGroup>
1850
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\Cake.Issues.InspectCode.xml</DocumentationFile>
1951
</PropertyGroup>
@@ -29,6 +61,10 @@
2961
<PrivateAssets>all</PrivateAssets>
3062
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3163
</PackageReference>
64+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0">
65+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
66+
<PrivateAssets>all</PrivateAssets>
67+
</PackageReference>
3268
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
3369
<PrivateAssets>all</PrivateAssets>
3470
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
File renamed without changes.

0 commit comments

Comments
 (0)