Skip to content

Commit 9e13ea7

Browse files
committed
Merge template/faithlife-build.
2 parents a83df38 + bd1e19d commit 9e13ea7

10 files changed

Lines changed: 118 additions & 28 deletions

File tree

.editorconfig

Lines changed: 98 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ indent_style = tab
2525
insert_final_newline = false
2626

2727
[*.cs]
28-
indent_size = 4
28+
indent_size = tab
2929
indent_style = tab
30+
tab_width = 4
3031
csharp_indent_block_contents = true
3132
csharp_indent_braces = false
3233
csharp_indent_case_contents = true
@@ -79,22 +80,30 @@ csharp_style_expression_bodied_local_functions = true : suggestion
7980
csharp_style_expression_bodied_methods = true : suggestion
8081
csharp_style_expression_bodied_operators = true : suggestion
8182
csharp_style_expression_bodied_properties = true : suggestion
83+
csharp_style_implicit_object_creation_when_type_is_apparent = true : suggestion
8284
csharp_style_inlined_variable_declaration = true : suggestion
8385
csharp_style_namespace_declarations = file_scoped : suggestion
84-
csharp_style_pattern_local_over_anonymous_function = true : suggestion
8586
csharp_style_pattern_matching_over_as_with_null_check = true : suggestion
8687
csharp_style_pattern_matching_over_is_with_cast_check = true : suggestion
88+
csharp_style_prefer_extended_property_pattern = true : suggestion
8789
csharp_style_prefer_index_operator = true : suggestion
90+
csharp_style_prefer_local_over_anonymous_function = true : suggestion
91+
csharp_style_prefer_not_pattern = true : suggestion
92+
csharp_style_prefer_null_check_over_type_check = true : suggestion
93+
csharp_style_prefer_pattern_matching = true : suggestion
8894
csharp_style_prefer_range_operator = true : suggestion
8995
csharp_style_prefer_switch_expression = true : suggestion
96+
csharp_style_prefer_tuple_swap = true : warning
9097
csharp_style_throw_expression = true : suggestion
91-
csharp_style_unused_value_assignment_preference = discard_variable : suggestion
98+
csharp_style_unused_value_assignment_preference = discard_variable : warning
9299
csharp_style_unused_value_expression_statement_preference = discard_variable : none
93100
csharp_style_var_elsewhere = true : suggestion
94101
csharp_style_var_for_built_in_types = true : suggestion
95102
csharp_style_var_when_type_is_apparent = true : suggestion
96103
csharp_using_directive_placement = outside_namespace : warning
104+
dotnet_analyzer_diagnostic.severity = warning
97105
dotnet_code_quality_unused_parameters = all : suggestion
106+
dotnet_diagnostic.CA1014.severity = none
98107
dotnet_diagnostic.CA1030.severity = none
99108
dotnet_diagnostic.CA1031.severity = suggestion
100109
dotnet_diagnostic.CA1032.severity = suggestion
@@ -105,6 +114,8 @@ dotnet_diagnostic.CA1062.severity = suggestion
105114
dotnet_diagnostic.CA1063.severity = none
106115
dotnet_diagnostic.CA1303.severity = none
107116
dotnet_diagnostic.CA1308.severity = suggestion
117+
dotnet_diagnostic.CA1309.severity = suggestion
118+
dotnet_diagnostic.CA1508.severity = suggestion
108119
dotnet_diagnostic.CA1707.severity = none
109120
dotnet_diagnostic.CA1716.severity = none
110121
dotnet_diagnostic.CA1720.severity = suggestion
@@ -114,10 +125,89 @@ dotnet_diagnostic.CA1816.severity = none
114125
dotnet_diagnostic.CA1819.severity = suggestion
115126
dotnet_diagnostic.CA1822.severity = suggestion
116127
dotnet_diagnostic.CA1826.severity = suggestion
128+
dotnet_diagnostic.CA1848.severity = suggestion
117129
dotnet_diagnostic.CA2000.severity = none
118130
dotnet_diagnostic.CA2227.severity = none
119131
dotnet_diagnostic.CA2234.severity = none
120132
dotnet_diagnostic.CA2237.severity = none
133+
dotnet_diagnostic.CA2254.severity = none
134+
dotnet_diagnostic.CA5351.severity = none
135+
dotnet_diagnostic.IDE0001.severity = warning
136+
dotnet_diagnostic.IDE0002.severity = warning
137+
dotnet_diagnostic.IDE0003.severity = warning
138+
dotnet_diagnostic.IDE0004.severity = warning
139+
dotnet_diagnostic.IDE0005.severity = warning
140+
dotnet_diagnostic.IDE0007.severity = suggestion
141+
dotnet_diagnostic.IDE0008.severity = suggestion
142+
dotnet_diagnostic.IDE0009.severity = warning
143+
dotnet_diagnostic.IDE0010.severity = suggestion
144+
dotnet_diagnostic.IDE0011.severity = suggestion
145+
dotnet_diagnostic.IDE0016.severity = suggestion
146+
dotnet_diagnostic.IDE0017.severity = suggestion
147+
dotnet_diagnostic.IDE0018.severity = suggestion
148+
dotnet_diagnostic.IDE0019.severity = suggestion
149+
dotnet_diagnostic.IDE0020.severity = suggestion
150+
dotnet_diagnostic.IDE0021.severity = suggestion
151+
dotnet_diagnostic.IDE0022.severity = suggestion
152+
dotnet_diagnostic.IDE0023.severity = suggestion
153+
dotnet_diagnostic.IDE0024.severity = suggestion
154+
dotnet_diagnostic.IDE0025.severity = suggestion
155+
dotnet_diagnostic.IDE0026.severity = suggestion
156+
dotnet_diagnostic.IDE0027.severity = suggestion
157+
dotnet_diagnostic.IDE0028.severity = suggestion
158+
dotnet_diagnostic.IDE0029.severity = warning
159+
dotnet_diagnostic.IDE0030.severity = warning
160+
dotnet_diagnostic.IDE0031.severity = suggestion
161+
dotnet_diagnostic.IDE0032.severity = suggestion
162+
dotnet_diagnostic.IDE0033.severity = warning
163+
dotnet_diagnostic.IDE0034.severity = suggestion
164+
dotnet_diagnostic.IDE0035.severity = warning
165+
dotnet_diagnostic.IDE0036.severity = warning
166+
dotnet_diagnostic.IDE0037.severity = suggestion
167+
dotnet_diagnostic.IDE0038.severity = suggestion
168+
dotnet_diagnostic.IDE0039.severity = suggestion
169+
dotnet_diagnostic.IDE0040.severity = warning
170+
dotnet_diagnostic.IDE0041.severity = suggestion
171+
dotnet_diagnostic.IDE0042.severity = suggestion
172+
dotnet_diagnostic.IDE0044.severity = warning
173+
dotnet_diagnostic.IDE0045.severity = suggestion
174+
dotnet_diagnostic.IDE0046.severity = none
175+
dotnet_diagnostic.IDE0047.severity = suggestion
176+
dotnet_diagnostic.IDE0048.severity = suggestion
177+
dotnet_diagnostic.IDE0049.severity = warning
178+
dotnet_diagnostic.IDE0051.severity = warning
179+
dotnet_diagnostic.IDE0052.severity = warning
180+
dotnet_diagnostic.IDE0053.severity = suggestion
181+
dotnet_diagnostic.IDE0054.severity = suggestion
182+
dotnet_diagnostic.IDE0056.severity = suggestion
183+
dotnet_diagnostic.IDE0057.severity = suggestion
184+
dotnet_diagnostic.IDE0058.severity = none
185+
dotnet_diagnostic.IDE0059.severity = warning
186+
dotnet_diagnostic.IDE0060.severity = suggestion
187+
dotnet_diagnostic.IDE0061.severity = suggestion
188+
dotnet_diagnostic.IDE0062.severity = suggestion
189+
dotnet_diagnostic.IDE0063.severity = suggestion
190+
dotnet_diagnostic.IDE0065.severity = warning
191+
dotnet_diagnostic.IDE0066.severity = suggestion
192+
dotnet_diagnostic.IDE0070.severity = suggestion
193+
dotnet_diagnostic.IDE0071.severity = suggestion
194+
dotnet_diagnostic.IDE0072.severity = suggestion
195+
dotnet_diagnostic.IDE0074.severity = suggestion
196+
dotnet_diagnostic.IDE0075.severity = warning
197+
dotnet_diagnostic.IDE0078.severity = suggestion
198+
dotnet_diagnostic.IDE0080.severity = suggestion
199+
dotnet_diagnostic.IDE0082.severity = warning
200+
dotnet_diagnostic.IDE0083.severity = suggestion
201+
dotnet_diagnostic.IDE0090.severity = suggestion
202+
dotnet_diagnostic.IDE0100.severity = warning
203+
dotnet_diagnostic.IDE0110.severity = warning
204+
dotnet_diagnostic.IDE0130.severity = warning
205+
dotnet_diagnostic.IDE0150.severity = suggestion
206+
dotnet_diagnostic.IDE0160.severity = suggestion
207+
dotnet_diagnostic.IDE0161.severity = suggestion
208+
dotnet_diagnostic.IDE0170.severity = suggestion
209+
dotnet_diagnostic.IDE0180.severity = warning
210+
dotnet_diagnostic.IDE1005.severity = suggestion
121211
dotnet_diagnostic.SA0001.severity = none
122212
dotnet_diagnostic.SA1003.severity = none
123213
dotnet_diagnostic.SA1008.severity = none
@@ -165,6 +255,8 @@ dotnet_diagnostic.SA1633.severity = none
165255
dotnet_diagnostic.SA1642.severity = none
166256
dotnet_diagnostic.SA1643.severity = none
167257
dotnet_diagnostic.SX1101.severity = warning
258+
dotnet_diagnostic.SYSLIB1045.severity = suggestion
259+
dotnet_diagnostic.SYSLIB1054.severity = none
168260
dotnet_naming_rule.local_functions_rule.severity = warning
169261
dotnet_naming_rule.local_functions_rule.style = upper_camel_case_style
170262
dotnet_naming_rule.local_functions_rule.symbols = local_functions_symbols
@@ -205,6 +297,7 @@ dotnet_sort_system_directives_first = true
205297
dotnet_style_coalesce_expression = true : warning
206298
dotnet_style_collection_initializer = true : suggestion
207299
dotnet_style_explicit_tuple_names = true : warning
300+
dotnet_style_namespace_match_folder = true : warning
208301
dotnet_style_null_propagation = true : suggestion
209302
dotnet_style_object_initializer = true : suggestion
210303
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity : none
@@ -220,6 +313,8 @@ dotnet_style_prefer_conditional_expression_over_return = true : none
220313
dotnet_style_prefer_inferred_anonymous_type_member_names = true : suggestion
221314
dotnet_style_prefer_inferred_tuple_names = true : suggestion
222315
dotnet_style_prefer_is_null_check_over_reference_equality_method = true : suggestion
316+
dotnet_style_prefer_simplified_boolean_expressions = true : warning
317+
dotnet_style_prefer_simplified_interpolation = true : suggestion
223318
dotnet_style_qualification_for_event = false : warning
224319
dotnet_style_qualification_for_field = false : warning
225320
dotnet_style_qualification_for_method = false : warning

Directory.Build.props

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
<EmbedUntrackedSources>true</EmbedUntrackedSources>
2323
<EnableNETAnalyzers>true</EnableNETAnalyzers>
2424
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
25+
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
26+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
2527
<IsPackable>false</IsPackable>
2628
<IsTestProject>false</IsTestProject>
2729
</PropertyGroup>
@@ -32,13 +34,13 @@
3234
</PropertyGroup>
3335

3436
<PropertyGroup>
35-
<FacilityVersion>2.10.0-beta.1</FacilityVersion>
37+
<FacilityVersion>2.10.1</FacilityVersion>
3638
</PropertyGroup>
3739

3840
<ItemGroup>
39-
<PackageReference Include="Faithlife.Analyzers" Version="1.3.1" PrivateAssets="All" IncludeAssets="runtime; build; native; contentfiles; analyzers" />
41+
<PackageReference Include="Faithlife.Analyzers" Version="1.4.0" PrivateAssets="All" IncludeAssets="runtime; build; native; contentfiles; analyzers" />
4042
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
41-
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.435" PrivateAssets="All" IncludeAssets="runtime; build; native; contentfiles; analyzers" />
43+
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.507" PrivateAssets="All" IncludeAssets="runtime; build; native; contentfiles; analyzers" />
4244
</ItemGroup>
4345

4446
</Project>

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ facility-core | Common code for the Facility API Framework. | [![npm](https://im
1010
fsdgenjs | A tool that generates JavaScript or TypeScript for a Facility Service Definition. | [![NuGet](https://img.shields.io/nuget/v/fsdgenjs.svg)](https://www.nuget.org/packages/fsdgenjs)
1111
Facility.CodeGen.JavaScript | A library that generates JavaScript or TypeScript for a Facility Service Definition. | [![NuGet](https://img.shields.io/nuget/v/Facility.CodeGen.JavaScript.svg)](https://www.nuget.org/packages/Facility.CodeGen.JavaScript)
1212

13-
[Documentation](https://facilityapi.github.io/) | [Release Notes](ReleaseNotes.md) | [Contributing](CONTRIBUTING.md)
13+
[Documentation](https://facilityapi.github.io/) | [Release Notes](https://github.com/FacilityApi/FacilityJavaScript/blob/master/ReleaseNotes.md) | [Contributing](https://github.com/FacilityApi/FacilityJavaScript/blob/master/CONTRIBUTING.md)

dotnet-tools.json

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,8 @@
22
"version": 1,
33
"isRoot": true,
44
"tools": {
5-
"dotnet-format": {
6-
"version": "5.1.250801",
7-
"commands": [
8-
"dotnet-format"
9-
]
10-
},
11-
"jetbrains.resharper.globaltools": {
12-
"version": "2022.3.1",
13-
"commands": [
14-
"jb"
15-
]
16-
},
175
"facilityconformance": {
18-
"version": "2.19.0-beta.1",
6+
"version": "2.19.0",
197
"commands": [
208
"FacilityConformance"
219
]

src/Facility.CodeGen.JavaScript/Facility.CodeGen.JavaScript.csproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,15 @@
55
<Description>A library that generates JavaScript or TypeScript for a Facility Service Definition.</Description>
66
<PackageTags>Facility FSD JavaScript TypeScript CodeGen</PackageTags>
77
<IsPackable>true</IsPackable>
8-
<GenerateDocumentationFile>true</GenerateDocumentationFile>
8+
<PackageReadmeFile>README.md</PackageReadmeFile>
99
</PropertyGroup>
1010

1111
<ItemGroup>
1212
<PackageReference Include="Facility.Definition" Version="$(FacilityVersion)" />
1313
</ItemGroup>
1414

15+
<ItemGroup>
16+
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
17+
</ItemGroup>
18+
1519
</Project>

src/fsdgenjs/fsdgenjs.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<PackageTags>Facility FSD JavaScript TypeScript CodeGen</PackageTags>
88
<IsPackable>true</IsPackable>
99
<PackAsTool>true</PackAsTool>
10+
<PackageReadmeFile>README.md</PackageReadmeFile>
1011
</PropertyGroup>
1112

1213
<ItemGroup>
@@ -17,4 +18,8 @@
1718
<ProjectReference Include="..\Facility.CodeGen.JavaScript\Facility.CodeGen.JavaScript.csproj" />
1819
</ItemGroup>
1920

21+
<ItemGroup>
22+
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
23+
</ItemGroup>
24+
2025
</Project>

tests/Facility.CodeGen.JavaScript.UnitTests/JavaScriptGeneratorTests.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
using System.IO;
2-
using System.Linq;
31
using System.Reflection;
42
using Facility.Definition;
53
using Facility.Definition.Fsd;

tools/Build/Build.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,7 @@ void RunCodeGen(params string?[] args) =>
7979
.Describe("Publishes the npm package.")
8080
.Does(() =>
8181
{
82-
var token = Environment.GetEnvironmentVariable("NPM_ACCESS_TOKEN");
83-
if (token is null)
84-
throw new BuildException("Missing NPM_ACCESS_TOKEN.");
82+
var token = Environment.GetEnvironmentVariable("NPM_ACCESS_TOKEN") ?? throw new BuildException("Missing NPM_ACCESS_TOKEN.");
8583
File.WriteAllText("./ts/.npmrc", $"//registry.npmjs.org/:_authToken={token}");
8684

8785
RunNpmFrom("./ts", "publish");

tools/Build/Build.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<PackageReference Include="Faithlife.Build" Version="5.16.1" />
9+
<PackageReference Include="Faithlife.Build" Version="5.19.0" />
1010
</ItemGroup>
1111

1212
</Project>

tools/XmlDocGen/XmlDocGen.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</ItemGroup>
1111

1212
<ItemGroup>
13-
<PackageReference Include="XmlDocMarkdown.Core" Version="2.8.0" />
13+
<PackageReference Include="XmlDocMarkdown.Core" Version="2.9.0" />
1414
</ItemGroup>
1515

1616
</Project>

0 commit comments

Comments
 (0)