From a7c6a850846edba6691cd3448ae721034cfd8f15 Mon Sep 17 00:00:00 2001 From: Rene Nochebuena Date: Thu, 10 Apr 2025 10:57:51 -0600 Subject: [PATCH] Refactor test binary location and update sonar exclusions Moved the test binary from "tests" to "testbin" for better organization. Updated `sonar-project.properties` to exclude the new directory from analysis and adjusted test references accordingly. --- log_test.go | 2 +- sonar-project.properties | 2 +- {tests => testbin}/main.go | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename {tests => testbin}/main.go (100%) diff --git a/log_test.go b/log_test.go index a744ad9..f7fcbb1 100644 --- a/log_test.go +++ b/log_test.go @@ -99,7 +99,7 @@ func Test_PanicPlainTextLogs(t *testing.T) { func Test_FatalPlainTextLogs(t *testing.T) { cmd := exec.Command( - "go", "run", "./test/main.go", + "go", "run", "./testbin/main.go", ) cmd.Env = append(cmd.Env, "TEST_FATAL=1") diff --git a/sonar-project.properties b/sonar-project.properties index 3e4456d..e3c95ed 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -2,7 +2,7 @@ sonar.projectKey=b97a45b2-c25d-4fd1-898d-136414896ce6 sonar.projectName=mother-utils/motherlog sonar.language=go sonar.sources=. -sonar.exclusions=**/*_test.go +sonar.exclusions=**/*_test.go, testbin/** sonar.tests=. sonar.test.inclusions=**/*_test.go sonar.go.tests.reportPaths=test-report.out diff --git a/tests/main.go b/testbin/main.go similarity index 100% rename from tests/main.go rename to testbin/main.go