Files
clean-architecture-backend-…/config/spotbugs/exclude-test.xml
T
DongHyeonka 1388c06a9f refactor(layout)!: Gradle 루트와 계층 폴더를 옮긴다(옮기기만)
문제: Gradle 루트가 src/라서 빌드 도구(build-logic, gradle, config, 빌드
파일)가 계층 코드 폴더 옆에 섞여 있다. composition과 app-bootstrap은 같은
조립 계층인데 폴더가 따로이고, application 모듈 넷은 최상위에 흩어져 있다.
「Gradle은 src/에서 실행」이라는 예외 규칙이 모든 문서와 스크립트에 퍼졌다.

고른 방법: 저장소 루트를 Gradle 루트로 하고 src/에는 계층 코드만 둔다
(design-docs repo-structure/01-backend-layout.md 6.1절 가-2·가-3, 소유자
승인 2026-11-07). 이 커밋은 git mv만 한다. 이름 바꾸기 감지가 1541개
파일 모두를 R100으로 잡도록 내용을 바꾸지 않았다. 바뀐 곳은 둘뿐이다:
src/.gitignore의 줄을 루트 .gitignore로 옮겼다.

- 빌드 파일, gradle/, build-logic/ → 저장소 루트
- config/checkstyle·spotbugs → config/ (코드 검사 도구 설정만)
- registry config/architecture/modules.json → gradle/modules.json,
  시험 이미지 config/testing/container-images.properties
  → gradle/container-images.properties, registry 설명 → gradle/README.md
- Dockerfile, .dockerignore, .env*.example → 저장소 루트
- src/README.md(빌드·env 참조) → docs/build.md
- src/domain-core → src/domain/core,
  src/application-* → src/application/*,
  src/app-bootstrap → src/bootstrap/app,
  src/composition/* → src/bootstrap/*
- 기능 생성 템플릿 scripts/feature-scaffold/{templates,probes}/src/ 아래도
  같은 모양으로(domain/core, application/core, bootstrap/app)

위험: 이 커밋만으로는 빌드되지 않는다. 경로를 부르는 곳은 다음 커밋이
고친다. 두 커밋을 나눈 것은 파생 서비스가 merge할 때 이름 바꾸기와 내용
변경을 따로 보게 하려는 것이다.

검증: git diff --cached -M --name-status 에서 R100 1541개, 그 밖은
.gitignore 수정과 src/.gitignore 삭제뿐.

BREAKING CHANGE: 모든 빌드 파일과 계층 폴더의 경로가 바뀐다. 옛 경로 →
새 경로 표와 받는 순서는 docs/upgrade/2026-11-relayout.md에 있다.
Refs: design-docs repo-structure/01-backend-layout.md 6.1절
2026-11-11 21:04:21 +09:00

150 lines
7.8 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!--
SpotBugs + FindSecBugs exclude filter for test code: every source set but main (test,
testFixtures, integrationTest, systemTest, architectureTest and the other lanes). Production code
is analysed by spotbugsMain against config/spotbugs/exclude.xml; this file is never applied to it
(QualityConventionsPlugin, testQualityCheck).
Until 2026-11-04 these tasks existed, ran in no gate, and 53 of them failed with 300 findings.
Each finding was judged. A rule is excluded below only when its reason holds for every test
class it can ever match; everything else was fixed, or is a Match scoped to one class with its
own reason (same rule as exclude.xml).
Test code never reaches a production classpath: test fixtures are consumed only by test suites
(`testImplementation testFixtures(...)`, `implementation testFixtures(project())` inside a
JvmTestSuite), which the dependency-direction gate keeps out of production configurations.
-->
<FindBugsFilter>
<!-- FindSecBugs (category SECURITY): taint, injection, deserialization, crypto, SSRF, path,
ReDoS, hard-coded credential and CSRF rules model untrusted input reaching a production
sink. A test writes its own input, runs only under the test runner, and holds fixture
credentials on purpose. The same code moved to main is analysed with these rules on. -->
<Match>
<Bug category="SECURITY"/>
</Match>
<!-- MALICIOUS_CODE (EI_EXPOSE_REP, EI_EXPOSE_REP2, MS_*): these protect a production object from
a caller that mutates state it was handed. Fakes and fixtures hand their state to the test
on purpose — that is how the test observes them. -->
<Match>
<Bug category="MALICIOUS_CODE"/>
</Match>
<!-- CT_CONSTRUCTOR_THROW: the risk is a finalizer attack by untrusted code that subclasses the
class. Test classes are instantiated by JUnit or by the test itself; a constructor that
throws fails the test. -->
<Match>
<Bug pattern="CT_CONSTRUCTOR_THROW"/>
</Match>
<!-- NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE: a test dereferences a value it expects to be there
(a response body, a header, a map entry). If it is null the NullPointerException fails the
test, which is the failure an unmet expectation should produce; a requireNonNull in front
adds a line and changes nothing. -->
<Match>
<Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE"/>
</Match>
<!-- DLS_DEAD_LOCAL_STORE into a local named `unused` or `ignored`: Error Prone's
CheckReturnValue makes a test keep the result it means to drop (`var unused =
catchThrowable(...)` when only the side effect is asserted), and the name says the value is
dropped on purpose. A dead store to any other name is still reported. -->
<Match>
<Bug pattern="DLS_DEAD_LOCAL_STORE"/>
<Local name="~unused|ignored"/>
</Match>
<!-- RV_RETURN_VALUE_IGNORED_INFERRED / _NO_SIDE_EFFECT inside a lambda: in test code these are
the ThrowingCallable / Executable handed to assertThatThrownBy, isThrownBy, catchThrowable
or assertThrows. Their type is void, so the value cannot be kept, and the call is made for
the exception it throws. RV_RETURN_VALUE_IGNORED (a must-check result such as
CountDownLatch.await) stays reported in lambdas too. -->
<Match>
<Or>
<Bug pattern="RV_RETURN_VALUE_IGNORED_INFERRED"/>
<Bug pattern="RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT"/>
</Or>
<Method name="~lambda\$.*"/>
</Match>
<!-- NP_OPTIONAL_RETURN_NULL: the test hands the interceptor an authentication policy that
returns null instead of an Optional, to prove the interceptor closes the call as
UNAUTHENTICATED rather than throwing. The null is the input under test. -->
<Match>
<Bug pattern="NP_OPTIONAL_RETURN_NULL"/>
<Class name="dev.caskeleton.adapter.inbound.grpc.GrpcAuthenticationInterceptorTest"/>
<Method name="~lambda\$aPolicyReturningNullIsRejectedAsUnauthenticated\$.*"/>
</Match>
<!-- DMI_HARDCODED_ABSOLUTE_FILENAME: FileserverStartupValidator compares a storage root with
forbidden ancestors (toAbsolutePath, normalize, startsWith) and never opens either path, so
the absolute paths are the input under test, not files the test depends on. -->
<Match>
<Bug pattern="DMI_HARDCODED_ABSOLUTE_FILENAME"/>
<Class name="~dev\.caskeleton\.adapter\.outbound\.fileserver\.platform\.autoconfigure\.FileserverStartupValidatorTest(\$CheckBuilder)?"/>
</Match>
<!-- VA_FORMAT_STRING_USES_NEWLINE: each of these formats a text block, whose line terminator
is \n on every platform by the language's definition, and whose content is parsed rather
than printed (JSON evidence, a JSON image manifest, SQL). %n would put \r\n into the
document on Windows and change nothing a parser reads. -->
<Match>
<Bug pattern="VA_FORMAT_STRING_USES_NEWLINE"/>
<Or>
<Class name="dev.caskeleton.adapter.outbound.messaging.evidence.MessagingEvidenceSchemaValidatorTest"/>
<Class name="dev.caskeleton.adapter.outbound.objectstorage.qualification.MinioQualificationImageTest"/>
<Class name="dev.caskeleton.adapter.outbound.persistence.readiness.PostgreSqlBaseStreamUpgradeIntegrationTest"/>
</Or>
<Method name="&lt;clinit&gt;"/>
</Match>
<!-- DM_GC: the test is about what garbage collection does — a gauge that must survive a
collection instead of decaying to NaN through a weak reference. System.gc() is the request
it exists to make. -->
<Match>
<Bug pattern="DM_GC"/>
<Or>
<And>
<Class name="dev.caskeleton.adapter.outbound.notification.platform.autoconfigure.NotificationObservationTest"/>
<Method name="aGaugeKeepsReportingAfterGarbageCollectionInsteadOfDecayingToNaN"/>
</And>
</Or>
</Match>
<!-- OBL_UNSATISFIED_OBLIGATION: `when(connection.prepareStatement(anyString())).thenThrow(...)`
is Mockito stubbing on a mock Connection. The call records the stub; no statement is
opened, and the stub makes every later call throw instead of returning one. -->
<Match>
<Bug pattern="OBL_UNSATISFIED_OBLIGATION"/>
<Class name="dev.caskeleton.adapter.outbound.persistence.experimental.schema.SchemaMultiTenantConnectionProviderTest"/>
<Method name="connectionWhoseResetFails"/>
</Match>
<!-- NM_FIELD_NAMING_CONVENTION: ApprovalTests' org.packagesettings reads the field of a class
named PackageSettings by its exact name, `UseApprovalSubdirectory`. Renaming it to Java
style would silently stop routing approved files into approved/. -->
<Match>
<Bug pattern="NM_FIELD_NAMING_CONVENTION"/>
<Class name="dev.caskeleton.bootstrap.contract.PackageSettings"/>
<Field name="UseApprovalSubdirectory"/>
</Match>
<!-- UUF_UNUSED_FIELD: TestTaxonomyArchitectureTest's positive control imports this class's
bytecode to prove the Testcontainers ban fires. The field's type is the dependency the rule
must see; the field is never meant to be read. -->
<Match>
<Bug pattern="UUF_UNUSED_FIELD"/>
<Class name="dev.caskeleton.bootstrap.taxonomyfixtures.TestcontainersUsingFixture"/>
<Field name="container"/>
</Match>
<!-- app-bootstrap architectureTest violation fixtures: classes written to break an
architecture rule so the rule's test can show it fails (ArchitectureViolationFixtureTest).
Their defects are the point. -->
<Match>
<Class name="~dev\.caskeleton\.bootstrap\.architecture\.violations\..*"/>
</Match>
</FindBugsFilter>