Skip to content

Commit c1f8ebc

Browse files
committed
refactor!: reorganize folder structure
1 parent 97329a0 commit c1f8ebc

Some content is hidden

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

44 files changed

+101
-72
lines changed

.codacy.yml

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,29 @@
1-
# https://docs.codacy.com/repositories-configure/codacy-configuration-file/
1+
# Codacy configuration for excluding files and folders from analysis
2+
# https://docs.codacy.com/repositories-configure/codacy-configuration-file/#ignore-files
3+
# Uses Java GLOB syntax: https://docs.oracle.com/javase/tutorial/essential/io/fileOps.html#glob
24

35
exclude_paths:
4-
- ".github"
5-
- ".vscode"
6-
- ".gitignore"
7-
- "LICENSE"
8-
- "README.md"
9-
- "**.sln"
10-
- "**.csproj"
11-
- "**.json"
12-
- "**.yml"
13-
- "**/*Program.cs"
14-
- "**/Data/**"
15-
- "**/Enums/**"
16-
- "**/Mappings/**"
17-
- "**/Migrations/**"
18-
- "**/Models/**"
19-
- "**/Properties/**"
20-
- "**/Utilities/**"
21-
- "**.Tests/**"
6+
# Ignore all project-level metadata and documentation
7+
- '.gitignore' # root Git ignore file
8+
- 'LICENSE' # root license file
9+
- 'README.md' # root readme
10+
11+
# Ignore all file types that shouldn't be analyzed
12+
- '**.yml' # YAML files anywhere (build, config, pipelines)
13+
- '**.json' # JSON files (settings, config)
14+
- '**.png' # Images, e.g., Swagger diagram
15+
- '**.sln' # Solution files
16+
- '**.csproj' # C# project files
17+
18+
# Ignore generated or infrastructure files
19+
- '**/*Program.cs' # Main entry point, often not useful for static analysis
20+
21+
# Ignore specific folders across any depth in the project
22+
- '**/Data/**' # Repositories, DbContext, database file, etc.
23+
- '**/Enums/**' # Enumeration types
24+
- '**/Mappings/**' # AutoMapper profiles
25+
- '**/Migrations/**' # EF Core migration snapshots
26+
- '**/Models/**' # Domain and DTO models
27+
- '**/Properties/**' # launchSettings.json or AssemblyInfo.cs
28+
- '**/Utilities/**' # Helper extensions or static classes
29+
- '**/test/**' # Entire test suite (unit + integration)

.github/workflows/dotnet.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ jobs:
2929
# Use cache-dependency-path for cases when multiple dependency files
3030
# are used, or they are located in different subdirectories.
3131
cache-dependency-path: |
32-
Dotnet.Samples.AspNetCore.WebApi/packages.lock.json
33-
Dotnet.Samples.AspNetCore.WebApi.Tests/packages.lock.json
32+
src/Dotnet.Samples.AspNetCore.WebApi/packages.lock.json
33+
test/Dotnet.Samples.AspNetCore.WebApi.Tests/packages.lock.json
3434
3535
- name: Restore dependencies
3636
run: dotnet restore

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"type": "coreclr",
77
"request": "launch",
88
"preLaunchTask": "build",
9-
"program": "${workspaceFolder}/Dotnet.Samples.AspNetCore.WebApi/bin/Debug/net8.0/Dotnet.Samples.AspNetCore.WebApi.dll",
9+
"program": "${workspaceFolder}/src/Dotnet.Samples.AspNetCore.WebApi/bin/Debug/net8.0/Dotnet.Samples.AspNetCore.WebApi.dll",
1010
"serverReadyAction": {
1111
"action": "openExternally",
1212
"pattern": "\\bNow listening on:\\s+https://localhost:([0-9]+)",
-337 KB
Binary file not shown.
Lines changed: 36 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,36 @@
1-
2-
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio Version 17
4-
VisualStudioVersion = 17.5.002.0
5-
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dotnet.Samples.AspNetCore.WebApi", "Dotnet.Samples.AspNetCore.WebApi\Dotnet.Samples.AspNetCore.WebApi.csproj", "{5C9D575F-BA87-45E3-A809-A6A3FA8BACEC}"
7-
EndProject
8-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dotnet.Samples.AspNetCore.WebApi.Tests", "Dotnet.Samples.AspNetCore.WebApi.Tests\Dotnet.Samples.AspNetCore.WebApi.Tests.csproj", "{EB141171-BC47-4EAB-BD5B-61B24E0B509D}"
9-
EndProject
10-
Global
11-
GlobalSection(SolutionConfigurationPlatforms) = preSolution
12-
Debug|Any CPU = Debug|Any CPU
13-
Release|Any CPU = Release|Any CPU
14-
EndGlobalSection
15-
GlobalSection(ProjectConfigurationPlatforms) = postSolution
16-
{5C9D575F-BA87-45E3-A809-A6A3FA8BACEC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17-
{5C9D575F-BA87-45E3-A809-A6A3FA8BACEC}.Debug|Any CPU.Build.0 = Debug|Any CPU
18-
{5C9D575F-BA87-45E3-A809-A6A3FA8BACEC}.Release|Any CPU.ActiveCfg = Release|Any CPU
19-
{5C9D575F-BA87-45E3-A809-A6A3FA8BACEC}.Release|Any CPU.Build.0 = Release|Any CPU
20-
{EB141171-BC47-4EAB-BD5B-61B24E0B509D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21-
{EB141171-BC47-4EAB-BD5B-61B24E0B509D}.Debug|Any CPU.Build.0 = Debug|Any CPU
22-
{EB141171-BC47-4EAB-BD5B-61B24E0B509D}.Release|Any CPU.ActiveCfg = Release|Any CPU
23-
{EB141171-BC47-4EAB-BD5B-61B24E0B509D}.Release|Any CPU.Build.0 = Release|Any CPU
24-
EndGlobalSection
25-
GlobalSection(SolutionProperties) = preSolution
26-
HideSolutionNode = FALSE
27-
EndGlobalSection
28-
GlobalSection(ExtensibilityGlobals) = postSolution
29-
SolutionGuid = {2B47AED3-6774-467B-92AE-6A3EAC9741BA}
30-
EndGlobalSection
31-
EndGlobal
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.0.31903.59
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{6E3A447C-C7E3-4E1C-B70D-CE1C4E6B13E1}"
7+
EndProject
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dotnet.Samples.AspNetCore.WebApi", "src\Dotnet.Samples.AspNetCore.WebApi\Dotnet.Samples.AspNetCore.WebApi.csproj", "{1ED8A3DB-5092-4D79-ABA2-403797A6898C}"
9+
EndProject
10+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{0A2F456B-EF02-40FA-A529-E4DA81E545AB}"
11+
EndProject
12+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dotnet.Samples.AspNetCore.WebApi.Tests", "test\Dotnet.Samples.AspNetCore.WebApi.Tests\Dotnet.Samples.AspNetCore.WebApi.Tests.csproj", "{F45E3AF3-F6A2-4494-AEF2-2A228D5E8F1E}"
13+
EndProject
14+
Global
15+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
16+
Debug|Any CPU = Debug|Any CPU
17+
Release|Any CPU = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
23+
{1ED8A3DB-5092-4D79-ABA2-403797A6898C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
24+
{1ED8A3DB-5092-4D79-ABA2-403797A6898C}.Debug|Any CPU.Build.0 = Debug|Any CPU
25+
{1ED8A3DB-5092-4D79-ABA2-403797A6898C}.Release|Any CPU.ActiveCfg = Release|Any CPU
26+
{1ED8A3DB-5092-4D79-ABA2-403797A6898C}.Release|Any CPU.Build.0 = Release|Any CPU
27+
{F45E3AF3-F6A2-4494-AEF2-2A228D5E8F1E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
28+
{F45E3AF3-F6A2-4494-AEF2-2A228D5E8F1E}.Debug|Any CPU.Build.0 = Debug|Any CPU
29+
{F45E3AF3-F6A2-4494-AEF2-2A228D5E8F1E}.Release|Any CPU.ActiveCfg = Release|Any CPU
30+
{F45E3AF3-F6A2-4494-AEF2-2A228D5E8F1E}.Release|Any CPU.Build.0 = Release|Any CPU
31+
EndGlobalSection
32+
GlobalSection(NestedProjects) = preSolution
33+
{1ED8A3DB-5092-4D79-ABA2-403797A6898C} = {6E3A447C-C7E3-4E1C-B70D-CE1C4E6B13E1}
34+
{F45E3AF3-F6A2-4494-AEF2-2A228D5E8F1E} = {0A2F456B-EF02-40FA-A529-E4DA81E545AB}
35+
EndGlobalSection
36+
EndGlobal

README.md

Lines changed: 2 additions & 2 deletions

codecov.yml

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
coverage:
44

5-
#https://docs.codecov.com/docs/commit-status
5+
# https://docs.codecov.com/docs/commit-status
66
status:
77
project:
88
default:
99
target: 80% # Default target for all components
10-
threshold: 10% # Default threshold for all components
11-
if_not_found: success # If no coverage report is found, the status will be success
12-
if_ci_failed: error # If the CI failed, the status will be error
10+
threshold: 10% # Allowable drop in coverage without failing
11+
if_not_found: success # If no coverage report is found, don't fail
12+
if_ci_failed: error # CI failure should fail coverage check
1313

14-
# Components inherit the default settings
14+
# Components for focused coverage metrics
1515
controllers:
1616
paths:
1717
- "Dotnet.Samples.AspNetCore.WebApi/Controllers/"
@@ -21,16 +21,32 @@ coverage:
2121

2222
patch:
2323
default:
24-
target: 80% # Default target for all components
25-
threshold: 10% # Default threshold for all components
24+
target: 80% # Target for changed lines
25+
threshold: 10%
2626

27+
# https://docs.codecov.com/docs/ignoring-paths
2728
ignore:
28-
- "Dotnet.Samples.AspNetCore.WebApi/Data"
29-
- "Dotnet.Samples.AspNetCore.WebApi/Enums"
30-
- "Dotnet.Samples.AspNetCore.WebApi/Mappings"
31-
- "Dotnet.Samples.AspNetCore.WebApi/Migrations"
32-
- "Dotnet.Samples.AspNetCore.WebApi/Models"
33-
- "Dotnet.Samples.AspNetCore.WebApi/Properties"
34-
- "Dotnet.Samples.AspNetCore.WebApi/Utilities"
35-
- "Dotnet.Samples.AspNetCore.WebApi/Program.cs"
36-
- "Dotnet.Samples.AspNetCore.WebApi.Tests"
29+
# Ignore common project metadata and config files
30+
- '.*\.sln' # Solution files
31+
- '.*\.csproj' # C# project files
32+
- '.*\.json' # JSON config files (e.g., appsettings)
33+
- '.*\.yml' # YAML config files (e.g., pipelines)
34+
- '.*\.png' # Image assets (e.g., Swagger diagram)
35+
36+
# Ignore test project entirely
37+
- '.*\/test\/.*' # Any file in the test folder (unit/integration/utils)
38+
39+
# Ignore infrastructure and support folders anywhere in the project
40+
- '.*\/Data\/.*' # Repositories, DbContext, database files
41+
- '.*\/Enums\/.*' # Enums like Position
42+
- '.*\/Mappings\/.*' # AutoMapper profiles
43+
- '.*\/Migrations\/.*' # EF Core migration artifacts
44+
- '.*\/Models\/.*' # Domain and DTO models
45+
- '.*\/Properties\/.*' # launchSettings.json or other system files
46+
- '.*\/Utilities\/.*' # Static helper and extension classes
47+
48+
# Ignore application entry point and documentation files
49+
- '.*\/Program\.cs' # ASP.NET Core entry point
50+
- '.*\/\.gitignore' # Git ignore file
51+
- '.*\/LICENSE' # License text
52+
- '.*\/README\.md' # Project readme

docs/Swagger.png

367 KB

0 commit comments

Comments
 (0)