From 2a90b026016920d705e4acb3a3f4847660bedcb4 Mon Sep 17 00:00:00 2001 From: kurnakovv Date: Mon, 13 Jul 2026 17:00:04 +0900 Subject: [PATCH 01/13] Split unit/integration test codecov report (#128) --- .github/workflows/codecov.yml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 1c59ba57..2aad4260 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -25,10 +25,21 @@ jobs: run: dotnet restore - name: Build run: dotnet build --no-restore - - name: Test - run: dotnet test --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutput=TestResults\Coverage\coverage.xml /p:CoverletOutputFormat=cobertura - - name: Report Codecov + - name: Test Unit Tests with coverage + run: dotnet test tests/Biak.ConsoleApp.UnitTests/Biak.ConsoleApp.UnitTests.csproj --no-build --verbosity normal --collect:"XPlat Code Coverage;Format=cobertura" --results-directory ./TestResults/Unit + - name: Test Integration Tests with coverage + run: dotnet test tests/Biak.ConsoleApp.IntegrationTests/Biak.ConsoleApp.IntegrationTests.csproj --no-build --verbosity normal --collect:"XPlat Code Coverage;Format=cobertura" --results-directory ./TestResults/Integration + - name: Upload Unit Test Coverage to Codecov uses: codecov/codecov-action@v5 with: - files: ./TestResults/**/coverage.cobertura.xml + files: ./TestResults/Unit/**/coverage.cobertura.xml + flags: unit-tests + name: unit-tests-coverage + verbose: true + - name: Upload Integration Test Coverage to Codecov + uses: codecov/codecov-action@v5 + with: + files: ./TestResults/Integration/**/coverage.cobertura.xml + flags: integration-tests + name: integration-tests-coverage verbose: true From 7877bc0b78466e1e6287bb0fc62633a74927d2b4 Mon Sep 17 00:00:00 2001 From: kurnakovv Date: Mon, 13 Jul 2026 17:08:32 +0900 Subject: [PATCH 02/13] Add new not coverade code for test (#128) --- src/Biak.ConsoleApp/Helpers/BiakConfigHelper.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Biak.ConsoleApp/Helpers/BiakConfigHelper.cs b/src/Biak.ConsoleApp/Helpers/BiakConfigHelper.cs index 58dbea44..102dacff 100644 --- a/src/Biak.ConsoleApp/Helpers/BiakConfigHelper.cs +++ b/src/Biak.ConsoleApp/Helpers/BiakConfigHelper.cs @@ -30,6 +30,10 @@ public static class BiakConfigHelper } json = await File.ReadAllTextAsync(configPath); } + if (string.IsNullOrWhiteSpace(json)) + { + throw new NotImplementedException("Test codecov"); + } try { BiakConfig? config = JsonSerializer.Deserialize(json, GlobalJsonSerializerOptionsHelper.Value); From f8a1da4ede9e5cdbd839b991dc1015dd6fe090a3 Mon Sep 17 00:00:00 2001 From: kurnakovv Date: Mon, 13 Jul 2026 17:17:45 +0900 Subject: [PATCH 03/13] Add new uncover code (#128) --- src/Biak.ConsoleApp/Helpers/BiakConfigHelper.cs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/Biak.ConsoleApp/Helpers/BiakConfigHelper.cs b/src/Biak.ConsoleApp/Helpers/BiakConfigHelper.cs index 102dacff..59d7c836 100644 --- a/src/Biak.ConsoleApp/Helpers/BiakConfigHelper.cs +++ b/src/Biak.ConsoleApp/Helpers/BiakConfigHelper.cs @@ -14,6 +14,16 @@ namespace Biak.ConsoleApp.Helpers; /// public static class BiakConfigHelper { + /// + /// Check if .biak/config.json exists in the current directory. + /// + /// True when config exists; otherwise false. + public static bool ExistsInCurrentDirectory() + { + string configPath = Path.Join(".biak", "config.json"); + return File.Exists(configPath); + } + /// /// Get .biak/config model. /// @@ -30,10 +40,6 @@ public static class BiakConfigHelper } json = await File.ReadAllTextAsync(configPath); } - if (string.IsNullOrWhiteSpace(json)) - { - throw new NotImplementedException("Test codecov"); - } try { BiakConfig? config = JsonSerializer.Deserialize(json, GlobalJsonSerializerOptionsHelper.Value); From 9ea07d093e7466448bcc7a3f54fd82053e15fdce Mon Sep 17 00:00:00 2001 From: kurnakovv Date: Mon, 13 Jul 2026 17:38:55 +0900 Subject: [PATCH 04/13] Add unit test (#128) --- .../Helpers/BiakConfigHelperTests.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/Biak.ConsoleApp.UnitTests/Helpers/BiakConfigHelperTests.cs b/tests/Biak.ConsoleApp.UnitTests/Helpers/BiakConfigHelperTests.cs index cbd318e1..9dd870f4 100644 --- a/tests/Biak.ConsoleApp.UnitTests/Helpers/BiakConfigHelperTests.cs +++ b/tests/Biak.ConsoleApp.UnitTests/Helpers/BiakConfigHelperTests.cs @@ -135,4 +135,14 @@ public async Task GetAllPropertiesAsync() Assert.Equal([SeverityLevelType.Error, SeverityLevelType.Warning], resultConfig.SeveritiesToDisable); Assert.Equal(FailureBehaviorType.Error, resultConfig.OnImportFailure); } + + [Fact] + public void ExistsInCurrentDirectory() + { + bool expected = File.Exists(Path.Join(".biak", "config.json")); + + bool result = BiakConfigHelper.ExistsInCurrentDirectory(); + + Assert.Equal(expected, result); + } } From 8455da7698dce6c280abb73085af2e6081032898 Mon Sep 17 00:00:00 2001 From: kurnakovv Date: Mon, 13 Jul 2026 17:44:38 +0900 Subject: [PATCH 05/13] Add disable_search: true (#128) --- .github/workflows/codecov.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 2aad4260..2846de60 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -25,6 +25,8 @@ jobs: run: dotnet restore - name: Build run: dotnet build --no-restore + - name: Clean TestResults + run: rm -rf ./TestResults - name: Test Unit Tests with coverage run: dotnet test tests/Biak.ConsoleApp.UnitTests/Biak.ConsoleApp.UnitTests.csproj --no-build --verbosity normal --collect:"XPlat Code Coverage;Format=cobertura" --results-directory ./TestResults/Unit - name: Test Integration Tests with coverage @@ -33,6 +35,7 @@ jobs: uses: codecov/codecov-action@v5 with: files: ./TestResults/Unit/**/coverage.cobertura.xml + disable_search: true flags: unit-tests name: unit-tests-coverage verbose: true @@ -40,6 +43,7 @@ jobs: uses: codecov/codecov-action@v5 with: files: ./TestResults/Integration/**/coverage.cobertura.xml + disable_search: true flags: integration-tests name: integration-tests-coverage verbose: true From fe68665784a18dd3f6f3b09edc2ef4859a600de7 Mon Sep 17 00:00:00 2001 From: kurnakovv Date: Mon, 13 Jul 2026 17:52:34 +0900 Subject: [PATCH 06/13] Hard name for codecov flags (#128) --- .github/workflows/codecov.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 2846de60..7b9c9e46 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -29,12 +29,16 @@ jobs: run: rm -rf ./TestResults - name: Test Unit Tests with coverage run: dotnet test tests/Biak.ConsoleApp.UnitTests/Biak.ConsoleApp.UnitTests.csproj --no-build --verbosity normal --collect:"XPlat Code Coverage;Format=cobertura" --results-directory ./TestResults/Unit + - name: Normalize Unit coverage file + run: find ./TestResults/Unit -name coverage.cobertura.xml -print -quit | xargs -I{} cp "{}" ./TestResults/unit.cobertura.xml - name: Test Integration Tests with coverage run: dotnet test tests/Biak.ConsoleApp.IntegrationTests/Biak.ConsoleApp.IntegrationTests.csproj --no-build --verbosity normal --collect:"XPlat Code Coverage;Format=cobertura" --results-directory ./TestResults/Integration + - name: Normalize Integration coverage file + run: find ./TestResults/Integration -name coverage.cobertura.xml -print -quit | xargs -I{} cp "{}" ./TestResults/integration.cobertura.xml - name: Upload Unit Test Coverage to Codecov uses: codecov/codecov-action@v5 with: - files: ./TestResults/Unit/**/coverage.cobertura.xml + files: ./TestResults/unit.cobertura.xml disable_search: true flags: unit-tests name: unit-tests-coverage @@ -42,7 +46,7 @@ jobs: - name: Upload Integration Test Coverage to Codecov uses: codecov/codecov-action@v5 with: - files: ./TestResults/Integration/**/coverage.cobertura.xml + files: ./TestResults/integration.cobertura.xml disable_search: true flags: integration-tests name: integration-tests-coverage From fabada1a6f61fde71a054dea906f3da7a815d4f8 Mon Sep 17 00:00:00 2001 From: kurnakovv Date: Mon, 13 Jul 2026 17:58:28 +0900 Subject: [PATCH 07/13] Add codecov yml settings (#128) --- codecov.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 codecov.yml diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 00000000..241f4c38 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,20 @@ +codecov: + require_ci_to_pass: true + +coverage: + status: + project: + default: + enabled: false + unit-tests: + flags: + - unit-tests + integration-tests: + flags: + - integration-tests + +flags: + unit-tests: + carryforward: false + integration-tests: + carryforward: false From 031cd3eda849364573bf04a970824042d33e6ee8 Mon Sep 17 00:00:00 2001 From: kurnakovv Date: Mon, 13 Jul 2026 18:27:00 +0900 Subject: [PATCH 08/13] Add generate-coverage-reports.ps1 (#128) --- .gitignore | 8 +++- generate-coverage-reports.ps1 | 82 +++++++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 generate-coverage-reports.ps1 diff --git a/.gitignore b/.gitignore index 9491a2fd..07fecb1b 100644 --- a/.gitignore +++ b/.gitignore @@ -360,4 +360,10 @@ MigrationBackup/ .ionide/ # Fody - auto-generated XML schema -FodyWeavers.xsd \ No newline at end of file + +# Local .NET tools +.tools/ + +# Test coverage reports +CoverageReports/ +FodyWeavers.xsd diff --git a/generate-coverage-reports.ps1 b/generate-coverage-reports.ps1 new file mode 100644 index 00000000..e1b2b6f1 --- /dev/null +++ b/generate-coverage-reports.ps1 @@ -0,0 +1,82 @@ +param( + [switch]$NoBuild +) + +$ErrorActionPreference = 'Stop' + +$repoRoot = $PSScriptRoot +$testResultsRoot = Join-Path $repoRoot 'TestResults' +$reportsRoot = Join-Path $repoRoot 'CoverageReports' +$toolsPath = Join-Path $repoRoot '.tools' +$reportGeneratorExe = Join-Path $toolsPath 'reportgenerator.exe' + +$unitProject = Join-Path $repoRoot 'tests/Biak.ConsoleApp.UnitTests/Biak.ConsoleApp.UnitTests.csproj' +$integrationProject = Join-Path $repoRoot 'tests/Biak.ConsoleApp.IntegrationTests/Biak.ConsoleApp.IntegrationTests.csproj' + +function Get-CoverageFilePath { + param( + [Parameter(Mandatory = $true)] + [string]$Directory + ) + + $coverageFile = Get-ChildItem -Path $Directory -Recurse -Filter 'coverage.cobertura.xml' | + Sort-Object LastWriteTime -Descending | + Select-Object -First 1 + + if (-not $coverageFile) { + throw "Coverage file not found under '$Directory'." + } + + return $coverageFile.FullName +} + +Push-Location $repoRoot +try { + Write-Host 'Cleaning previous coverage artifacts...' + Remove-Item -Path $testResultsRoot -Recurse -Force -ErrorAction SilentlyContinue + Remove-Item -Path $reportsRoot -Recurse -Force -ErrorAction SilentlyContinue + + Write-Host 'Ensuring ReportGenerator tool is available...' + New-Item -ItemType Directory -Path $toolsPath -Force | Out-Null + if (Test-Path $reportGeneratorExe) { + dotnet tool update dotnet-reportgenerator-globaltool --tool-path $toolsPath | Out-Null + } + else { + dotnet tool install dotnet-reportgenerator-globaltool --tool-path $toolsPath | Out-Null + } + + if ($NoBuild) { + Write-Host 'Running unit tests with coverage (no build)...' + dotnet test $unitProject --no-build --collect:"XPlat Code Coverage;Format=cobertura" --results-directory "$testResultsRoot/Unit" + + Write-Host 'Running integration tests with coverage (no build)...' + dotnet test $integrationProject --no-build --collect:"XPlat Code Coverage;Format=cobertura" --results-directory "$testResultsRoot/Integration" + } + else { + Write-Host 'Running unit tests with coverage...' + dotnet test $unitProject --collect:"XPlat Code Coverage;Format=cobertura" --results-directory "$testResultsRoot/Unit" + + Write-Host 'Running integration tests with coverage...' + dotnet test $integrationProject --collect:"XPlat Code Coverage;Format=cobertura" --results-directory "$testResultsRoot/Integration" + } + + $unitCoverageFile = Get-CoverageFilePath -Directory (Join-Path $testResultsRoot 'Unit') + $integrationCoverageFile = Get-CoverageFilePath -Directory (Join-Path $testResultsRoot 'Integration') + + $unitReportDir = Join-Path $reportsRoot 'unit' + $integrationReportDir = Join-Path $reportsRoot 'integration' + + Write-Host 'Generating unit HTML coverage report...' + & $reportGeneratorExe "-reports:$unitCoverageFile" "-targetdir:$unitReportDir" '-reporttypes:Html' + + Write-Host 'Generating integration HTML coverage report...' + & $reportGeneratorExe "-reports:$integrationCoverageFile" "-targetdir:$integrationReportDir" '-reporttypes:Html' + + Write-Host '' + Write-Host 'Done.' + Write-Host "Unit report: $unitReportDir/index.html" + Write-Host "Integration report: $integrationReportDir/index.html" +} +finally { + Pop-Location +} From 0e970c03c0ecb430a9bce8ae55043fad34f9cf8f Mon Sep 17 00:00:00 2001 From: kurnakovv Date: Mon, 13 Jul 2026 18:39:28 +0900 Subject: [PATCH 09/13] Try to simplify codecov action (#128) --- .github/workflows/codecov.yml | 14 +++----------- codecov.yml | 20 -------------------- 2 files changed, 3 insertions(+), 31 deletions(-) delete mode 100644 codecov.yml diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 7b9c9e46..e02a1565 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -25,29 +25,21 @@ jobs: run: dotnet restore - name: Build run: dotnet build --no-restore - - name: Clean TestResults - run: rm -rf ./TestResults - name: Test Unit Tests with coverage run: dotnet test tests/Biak.ConsoleApp.UnitTests/Biak.ConsoleApp.UnitTests.csproj --no-build --verbosity normal --collect:"XPlat Code Coverage;Format=cobertura" --results-directory ./TestResults/Unit - - name: Normalize Unit coverage file - run: find ./TestResults/Unit -name coverage.cobertura.xml -print -quit | xargs -I{} cp "{}" ./TestResults/unit.cobertura.xml - name: Test Integration Tests with coverage run: dotnet test tests/Biak.ConsoleApp.IntegrationTests/Biak.ConsoleApp.IntegrationTests.csproj --no-build --verbosity normal --collect:"XPlat Code Coverage;Format=cobertura" --results-directory ./TestResults/Integration - - name: Normalize Integration coverage file - run: find ./TestResults/Integration -name coverage.cobertura.xml -print -quit | xargs -I{} cp "{}" ./TestResults/integration.cobertura.xml - name: Upload Unit Test Coverage to Codecov uses: codecov/codecov-action@v5 with: - files: ./TestResults/unit.cobertura.xml - disable_search: true + files: ./TestResults/Unit/**/coverage.cobertura.xml flags: unit-tests name: unit-tests-coverage verbose: true - name: Upload Integration Test Coverage to Codecov uses: codecov/codecov-action@v5 with: - files: ./TestResults/integration.cobertura.xml - disable_search: true + files: ./TestResults/Integration/**/coverage.cobertura.xml flags: integration-tests name: integration-tests-coverage - verbose: true + verbose: true \ No newline at end of file diff --git a/codecov.yml b/codecov.yml deleted file mode 100644 index 241f4c38..00000000 --- a/codecov.yml +++ /dev/null @@ -1,20 +0,0 @@ -codecov: - require_ci_to_pass: true - -coverage: - status: - project: - default: - enabled: false - unit-tests: - flags: - - unit-tests - integration-tests: - flags: - - integration-tests - -flags: - unit-tests: - carryforward: false - integration-tests: - carryforward: false From 741ace7daad28d0a1ab1db8e907e88953e3bd2ab Mon Sep 17 00:00:00 2001 From: kurnakovv Date: Mon, 13 Jul 2026 21:14:29 +0900 Subject: [PATCH 10/13] Revert "Try to simplify codecov action (#128)" This reverts commit 0e970c03c0ecb430a9bce8ae55043fad34f9cf8f. --- .github/workflows/codecov.yml | 14 +++++++++++--- codecov.yml | 20 ++++++++++++++++++++ 2 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 codecov.yml diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index e02a1565..7b9c9e46 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -25,21 +25,29 @@ jobs: run: dotnet restore - name: Build run: dotnet build --no-restore + - name: Clean TestResults + run: rm -rf ./TestResults - name: Test Unit Tests with coverage run: dotnet test tests/Biak.ConsoleApp.UnitTests/Biak.ConsoleApp.UnitTests.csproj --no-build --verbosity normal --collect:"XPlat Code Coverage;Format=cobertura" --results-directory ./TestResults/Unit + - name: Normalize Unit coverage file + run: find ./TestResults/Unit -name coverage.cobertura.xml -print -quit | xargs -I{} cp "{}" ./TestResults/unit.cobertura.xml - name: Test Integration Tests with coverage run: dotnet test tests/Biak.ConsoleApp.IntegrationTests/Biak.ConsoleApp.IntegrationTests.csproj --no-build --verbosity normal --collect:"XPlat Code Coverage;Format=cobertura" --results-directory ./TestResults/Integration + - name: Normalize Integration coverage file + run: find ./TestResults/Integration -name coverage.cobertura.xml -print -quit | xargs -I{} cp "{}" ./TestResults/integration.cobertura.xml - name: Upload Unit Test Coverage to Codecov uses: codecov/codecov-action@v5 with: - files: ./TestResults/Unit/**/coverage.cobertura.xml + files: ./TestResults/unit.cobertura.xml + disable_search: true flags: unit-tests name: unit-tests-coverage verbose: true - name: Upload Integration Test Coverage to Codecov uses: codecov/codecov-action@v5 with: - files: ./TestResults/Integration/**/coverage.cobertura.xml + files: ./TestResults/integration.cobertura.xml + disable_search: true flags: integration-tests name: integration-tests-coverage - verbose: true \ No newline at end of file + verbose: true diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 00000000..241f4c38 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,20 @@ +codecov: + require_ci_to_pass: true + +coverage: + status: + project: + default: + enabled: false + unit-tests: + flags: + - unit-tests + integration-tests: + flags: + - integration-tests + +flags: + unit-tests: + carryforward: false + integration-tests: + carryforward: false From 7a80eb6c645e46e149236ef43589cbccb34f2414 Mon Sep 17 00:00:00 2001 From: kurnakovv <59327306+kurnakovv@users.noreply.github.com> Date: Mon, 13 Jul 2026 21:26:21 +0900 Subject: [PATCH 11/13] Add no file check (#128) Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .github/workflows/codecov.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 7b9c9e46..7d2a1bab 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -30,7 +30,10 @@ jobs: - name: Test Unit Tests with coverage run: dotnet test tests/Biak.ConsoleApp.UnitTests/Biak.ConsoleApp.UnitTests.csproj --no-build --verbosity normal --collect:"XPlat Code Coverage;Format=cobertura" --results-directory ./TestResults/Unit - name: Normalize Unit coverage file - run: find ./TestResults/Unit -name coverage.cobertura.xml -print -quit | xargs -I{} cp "{}" ./TestResults/unit.cobertura.xml + run: | + coverage_file="$(find ./TestResults/Unit -name coverage.cobertura.xml -print -quit)" + test -n "$coverage_file" || (echo "Unit coverage file not found under ./TestResults/Unit" && exit 1) + cp "$coverage_file" ./TestResults/unit.cobertura.xml - name: Test Integration Tests with coverage run: dotnet test tests/Biak.ConsoleApp.IntegrationTests/Biak.ConsoleApp.IntegrationTests.csproj --no-build --verbosity normal --collect:"XPlat Code Coverage;Format=cobertura" --results-directory ./TestResults/Integration - name: Normalize Integration coverage file From b7446fddd9154073cbb914785a64d4f5a1b20b8d Mon Sep 17 00:00:00 2001 From: kurnakovv <59327306+kurnakovv@users.noreply.github.com> Date: Mon, 13 Jul 2026 21:26:32 +0900 Subject: [PATCH 12/13] Add no file check (#128) Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .github/workflows/codecov.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 7d2a1bab..40401a22 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -37,7 +37,10 @@ jobs: - name: Test Integration Tests with coverage run: dotnet test tests/Biak.ConsoleApp.IntegrationTests/Biak.ConsoleApp.IntegrationTests.csproj --no-build --verbosity normal --collect:"XPlat Code Coverage;Format=cobertura" --results-directory ./TestResults/Integration - name: Normalize Integration coverage file - run: find ./TestResults/Integration -name coverage.cobertura.xml -print -quit | xargs -I{} cp "{}" ./TestResults/integration.cobertura.xml + run: | + coverage_file="$(find ./TestResults/Integration -name coverage.cobertura.xml -print -quit)" + test -n "$coverage_file" || (echo "Integration coverage file not found under ./TestResults/Integration" && exit 1) + cp "$coverage_file" ./TestResults/integration.cobertura.xml - name: Upload Unit Test Coverage to Codecov uses: codecov/codecov-action@v5 with: From 8ca590ae9c16f1827c7c08708313cb8c9b6fb871 Mon Sep 17 00:00:00 2001 From: kurnakovv Date: Mon, 13 Jul 2026 21:39:55 +0900 Subject: [PATCH 13/13] Delete ExistsInCurrentDirectory (#128) --- src/Biak.ConsoleApp/Helpers/BiakConfigHelper.cs | 10 ---------- .../Helpers/BiakConfigHelperTests.cs | 10 ---------- 2 files changed, 20 deletions(-) diff --git a/src/Biak.ConsoleApp/Helpers/BiakConfigHelper.cs b/src/Biak.ConsoleApp/Helpers/BiakConfigHelper.cs index 59d7c836..58dbea44 100644 --- a/src/Biak.ConsoleApp/Helpers/BiakConfigHelper.cs +++ b/src/Biak.ConsoleApp/Helpers/BiakConfigHelper.cs @@ -14,16 +14,6 @@ namespace Biak.ConsoleApp.Helpers; /// public static class BiakConfigHelper { - /// - /// Check if .biak/config.json exists in the current directory. - /// - /// True when config exists; otherwise false. - public static bool ExistsInCurrentDirectory() - { - string configPath = Path.Join(".biak", "config.json"); - return File.Exists(configPath); - } - /// /// Get .biak/config model. /// diff --git a/tests/Biak.ConsoleApp.UnitTests/Helpers/BiakConfigHelperTests.cs b/tests/Biak.ConsoleApp.UnitTests/Helpers/BiakConfigHelperTests.cs index 9dd870f4..cbd318e1 100644 --- a/tests/Biak.ConsoleApp.UnitTests/Helpers/BiakConfigHelperTests.cs +++ b/tests/Biak.ConsoleApp.UnitTests/Helpers/BiakConfigHelperTests.cs @@ -135,14 +135,4 @@ public async Task GetAllPropertiesAsync() Assert.Equal([SeverityLevelType.Error, SeverityLevelType.Warning], resultConfig.SeveritiesToDisable); Assert.Equal(FailureBehaviorType.Error, resultConfig.OnImportFailure); } - - [Fact] - public void ExistsInCurrentDirectory() - { - bool expected = File.Exists(Path.Join(".biak", "config.json")); - - bool result = BiakConfigHelper.ExistsInCurrentDirectory(); - - Assert.Equal(expected, result); - } }