Skip to content

Commit 5dc8ae7

Browse files
authored
Merge pull request #104 from gothinkster/dotnet-7010
Dotnet 7010
2 parents f607c0a + 99a6946 commit 5dc8ae7

File tree

93 files changed

+5027
-2085
lines changed

Some content is hidden

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

93 files changed

+5027
-2085
lines changed

.config/dotnet-tools.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
"version": 1,
33
"isRoot": true,
44
"tools": {
5-
"dotnet-format": {
6-
"version": "5.1.225507",
5+
"csharpier": {
6+
"version": "0.25.0",
77
"commands": [
8-
"dotnet-format"
8+
"dotnet-csharpier"
99
]
1010
}
1111
}
12-
}
12+
}

.editorconfig

Lines changed: 67 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,8 @@ csharp_space_between_square_brackets = false
249249
csharp_preserve_single_line_statements = false
250250
csharp_preserve_single_line_blocks = true
251251

252+
csharp_style_namespace_declarations = file_scoped
253+
252254
##########################################
253255
# .NET Naming Conventions
254256
# https://docs.microsoft.com/visualstudio/ide/editorconfig-naming-conventions
@@ -258,12 +260,16 @@ csharp_preserve_single_line_blocks = true
258260
dotnet_diagnostic.CA1000.severity = suggestion
259261
dotnet_diagnostic.CA1001.severity = error
260262
dotnet_diagnostic.CA1018.severity = error
263+
dotnet_diagnostic.CA1036.severity = silent
261264
dotnet_diagnostic.CA1051.severity = suggestion
265+
dotnet_diagnostic.CA1068.severity = error
262266
dotnet_diagnostic.CA1069.severity = error
263267
dotnet_diagnostic.CA1304.severity = error
264268
dotnet_diagnostic.CA1305.severity = suggestion
269+
dotnet_diagnostic.CA1307.severity = suggestion
265270
dotnet_diagnostic.CA1309.severity = suggestion
266271
dotnet_diagnostic.CA1310.severity = error
272+
dotnet_diagnostic.CA1507.severity = suggestion
267273
dotnet_diagnostic.CA1707.severity = suggestion
268274
dotnet_diagnostic.CA1708.severity = suggestion
269275
dotnet_diagnostic.CA1711.severity = suggestion
@@ -273,23 +279,30 @@ dotnet_diagnostic.CA1725.severity = suggestion
273279
dotnet_diagnostic.CA1805.severity = suggestion
274280
dotnet_diagnostic.CA1816.severity = suggestion
275281
dotnet_diagnostic.CA1822.severity = suggestion
282+
dotnet_diagnostic.CA1824.severity = none
276283
dotnet_diagnostic.CA1825.severity = error
277284
dotnet_diagnostic.CA1826.severity = silent
278285
dotnet_diagnostic.CA1827.severity = error
279286
dotnet_diagnostic.CA1829.severity = suggestion
280287
dotnet_diagnostic.CA1834.severity = error
288+
dotnet_diagnostic.CA1845.severity = suggestion
289+
dotnet_diagnostic.CA1848.severity = suggestion
290+
dotnet_diagnostic.CA1852.severity = suggestion
281291
dotnet_diagnostic.CA2016.severity = suggestion
282292
dotnet_diagnostic.CA2201.severity = error
283293
dotnet_diagnostic.CA2206.severity = error
284294
dotnet_diagnostic.CA2208.severity = error
285295
dotnet_diagnostic.CA2211.severity = error
286296
dotnet_diagnostic.CA2249.severity = error
297+
dotnet_diagnostic.CA2251.severity = error
298+
dotnet_diagnostic.CA2252.severity = none
299+
dotnet_diagnostic.CA2254.severity = suggestion
287300

288301
dotnet_diagnostic.CS0169.severity = error
289302
dotnet_diagnostic.CS0219.severity = error
290303
dotnet_diagnostic.CS1998.severity = error
291-
dotnet_diagnostic.CS8602.severity = Default
292-
dotnet_diagnostic.CS8604.severity = Default
304+
dotnet_diagnostic.CS8602.severity = error
305+
dotnet_diagnostic.CS8604.severity = error
293306
dotnet_diagnostic.CS8618.severity = error
294307
dotnet_diagnostic.CS0618.severity = error
295308
dotnet_diagnostic.CS1998.severity = error
@@ -298,6 +311,58 @@ dotnet_diagnostic.CS8600.severity = error
298311
dotnet_diagnostic.CS8603.severity = error
299312
dotnet_diagnostic.CS8625.severity = error
300313

314+
dotnet_diagnostic.BL0005.severity = suggestion
315+
316+
dotnet_diagnostic.MVC1000.severity = suggestion
317+
318+
dotnet_diagnostic.RZ10012.severity = error
319+
320+
dotnet_diagnostic.IDE0004.severity = error # redundant cast
321+
dotnet_diagnostic.IDE0005.severity = suggestion
322+
dotnet_diagnostic.IDE0007.severity = error # Use var
323+
dotnet_diagnostic.IDE0011.severity = error # Use braces on if statements
324+
dotnet_diagnostic.IDE0010.severity = silent # populate switch
325+
dotnet_diagnostic.IDE0017.severity = suggestion # initialization can be simplified
326+
dotnet_diagnostic.IDE0021.severity = silent # expression body for constructors
327+
dotnet_diagnostic.IDE0022.severity = silent # expression body for methods
328+
dotnet_diagnostic.IDE0023.severity = suggestion # use expression body for operators
329+
dotnet_diagnostic.IDE0024.severity = silent # expression body for operators
330+
dotnet_diagnostic.IDE0025.severity = suggestion # use expression body for properties
331+
dotnet_diagnostic.IDE0027.severity = suggestion # Use expression body for accessors
332+
dotnet_diagnostic.IDE0028.severity = silent
333+
dotnet_diagnostic.IDE0032.severity = suggestion # Use auto property
334+
dotnet_diagnostic.IDE0033.severity = error # prefer tuple name
335+
dotnet_diagnostic.IDE0037.severity = suggestion # simplify anonymous type
336+
dotnet_diagnostic.IDE0040.severity = error # modifiers required
337+
dotnet_diagnostic.IDE0041.severity = error # simplify null
338+
dotnet_diagnostic.IDE0042.severity = error # deconstruct variable
339+
dotnet_diagnostic.IDE0044.severity = suggestion # make field only when possible
340+
dotnet_diagnostic.IDE0047.severity = suggestion # paratemeter name
341+
dotnet_diagnostic.IDE0051.severity = error # unused field
342+
dotnet_diagnostic.IDE0052.severity = error # unused member
343+
dotnet_diagnostic.IDE0053.severity = suggestion # lambda not needed
344+
dotnet_diagnostic.IDE0055.severity = suggestion # Fix formatting
345+
dotnet_diagnostic.IDE0057.severity = suggestion # substring can be simplified
346+
dotnet_diagnostic.IDE0060.severity = suggestion # unused parameters
347+
dotnet_diagnostic.IDE0061.severity = suggestion # local expression body
348+
dotnet_diagnostic.IDE0062.severity = suggestion # local to static
349+
dotnet_diagnostic.IDE0063.severity = error # simplify using
350+
dotnet_diagnostic.IDE0066.severity = suggestion # switch expression
351+
dotnet_diagnostic.IDE0072.severity = suggestion # Populate switch - forces population of all cases even when default specified
352+
dotnet_diagnostic.IDE0078.severity = suggestion # use pattern matching
353+
dotnet_diagnostic.IDE0090.severity = suggestion # new can be simplified
354+
dotnet_diagnostic.IDE0130.severity = suggestion # namespace folder structure
355+
dotnet_diagnostic.IDE0160.severity = silent # Use block namespaces ARE NOT required
356+
dotnet_diagnostic.IDE0161.severity = error # Please use file namespaces
357+
dotnet_diagnostic.IDE0200.severity = suggestion # lambda not needed
358+
dotnet_diagnostic.IDE1006.severity = suggestion # Naming rule violation: These words cannot contain lower case characters
359+
dotnet_diagnostic.IDE0270.severity = suggestion # Null check simplifcation
360+
dotnet_diagnostic.IDE0260.severity = suggestion # Use pattern matching
361+
362+
dotnet_diagnostic.NX0001.severity = error
363+
dotnet_diagnostic.NX0002.severity = silent
364+
dotnet_diagnostic.NX0003.severity = silent
365+
301366
##########################################
302367
# Styles
303368
##########################################

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions" # search for actions - there are other options available
4+
directory: "/" # search in .github/workflows under root `/`
5+
schedule:
6+
interval: "weekly" # check for action update every week

.github/workflows/dotnetcore.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ jobs:
88
runs-on: ubuntu-latest
99

1010
steps:
11-
- uses: actions/checkout@v1
12-
- uses: actions/setup-dotnet@v1
11+
- uses: actions/checkout@v4
12+
- uses: actions/setup-dotnet@v3
1313
with:
14-
dotnet-version: 5.0.400
14+
dotnet-version: 7.0.400
1515
- run: dotnet run -p build/build.csproj

Conduit.sln

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Conduit.IntegrationTests",
1313
EndProject
1414
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "build", "build\build.csproj", "{1A67215E-3B6F-4FDA-AB9B-D2ECDC676A29}"
1515
EndProject
16+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "config", "config", "{E0DF0CFA-3DF6-4E15-A3ED-ED68DBB4BE4E}"
17+
ProjectSection(SolutionItems) = preProject
18+
Directory.Packages.props = Directory.Packages.props
19+
Directory.Build.props = Directory.Build.props
20+
global.json = global.json
21+
EndProjectSection
22+
EndProject
23+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{79EC8D73-8DAD-430E-93CE-C1F29DBC33FA}"
24+
EndProject
1625
Global
1726
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1827
Debug|Any CPU = Debug|Any CPU
@@ -38,5 +47,6 @@ Global
3847
GlobalSection(NestedProjects) = preSolution
3948
{BFC1306F-9EBF-414C-8656-C50E3E5AFADA} = {7C288D93-2148-4679-9890-DBFCA0C59BCC}
4049
{CFFDDBF0-5CDD-4D88-A82B-68CBF2432999} = {9F832627-4D82-4B5B-84A7-244E8480845E}
50+
{1A67215E-3B6F-4FDA-AB9B-D2ECDC676A29} = {79EC8D73-8DAD-430E-93CE-C1F29DBC33FA}
4151
EndGlobalSection
4252
EndGlobal

Directory.Build.props

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<Project>
2+
<PropertyGroup>
3+
<TargetFramework>net7.0</TargetFramework>
4+
<Nullable>enable</Nullable>
5+
<AnalysisMode>Recommended</AnalysisMode>
6+
<WarningsAsErrors>true</WarningsAsErrors>
7+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
8+
<CodeAnalysisTreatWarningsAsErrors>true</CodeAnalysisTreatWarningsAsErrors>
9+
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
10+
<LibSassOutputStyle>expanded</LibSassOutputStyle>
11+
12+
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
13+
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
14+
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
15+
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
16+
</PropertyGroup>
17+
</Project>

Directory.Packages.props

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<Project>
2+
<ItemGroup>
3+
<PackageVersion Include="AutoMapper" Version="12.0.1" />
4+
<PackageVersion Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.1" />
5+
<PackageVersion Include="Bullseye" Version="4.2.1" />
6+
<PackageVersion Include="Glob" Version="1.1.9" />
7+
<PackageVersion Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.10" />
8+
<PackageVersion Include="Microsoft.EntityFrameworkCore.InMemory" Version="7.0.10" />
9+
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.10" />
10+
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.10" />
11+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
12+
<PackageVersion Include="Serilog" Version="3.0.1" />
13+
<PackageVersion Include="Serilog.Extensions.Logging" Version="7.0.0" />
14+
<PackageVersion Include="Serilog.Sinks.Console" Version="4.1.0" />
15+
<PackageVersion Include="FluentValidation.AspNetCore" Version="11.3.0" />
16+
<PackageVersion Include="MediatR" Version="12.1.1" />
17+
<PackageVersion Include="SimpleExec" Version="11.0.0" />
18+
<PackageVersion Include="Swashbuckle.AspNetCore" Version="6.5.0" />
19+
<PackageVersion Include="xunit" Version="2.5.0" />
20+
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.0"/>
21+
</ItemGroup>
22+
</Project>
File renamed without changes.

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
build:
2-
docker-compose build
2+
docker compose build
33
run:
4-
docker-compose up
4+
docker compose up

NuGet.config

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<packageSourceMapping>
4+
<!-- key value for <packageSource> should match key values from <packageSources> element -->
5+
<packageSource key="nuget.org">
6+
<package pattern="*" />
7+
</packageSource>
8+
</packageSourceMapping>
9+
</configuration>

0 commit comments

Comments
 (0)