Files
messaging-library/config/spotbugs/exclude-test.xml
T
DongHyeonka f076f6accc refactor(messaging)!: Java 패키지를 dev.cakit.messaging으로 바꾼다
템플릿 재사용 체크리스트는 파생 서비스에게 dev.caskeleton 패키지를
자기 이름으로 바꾸라고 한다. 라이브러리 패키지가 dev.caskeleton.messaging
그대로면, 체크리스트를 따르는 서비스가 import까지 바꿔 라이브러리
클래스를 찾지 못한다. Maven group(dev.cakit.messaging)과 패키지가 다른
말을 하는 것도 첫 배포 뒤에는 고칠 수 없다.

첫 배포(1.0.0) 전에 한 번 바꾼다(설계 NS3, 이름은 소유자 2026-11-08
결정 dev.cakit). 기계적으로 만들었다: 소스 폴더 dev/caskeleton/messaging
44곳을 git mv로 dev/cakit/messaging으로, 파일 411개의
dev.caskeleton.messaging·dev/caskeleton/messaging 문자열을
dev.cakit.messaging·dev/cakit/messaging으로 바꿨다. Kafka 클라이언트
설정 키 caskeleton.messaging.credential.{registry,id}(이 라이브러리
안에서만 쓰는 상수)도 cakit.messaging.credential.*로 바꿨다.
SpotBugs 제외 목록에서 템플릿 타입(@RequiresPermission) 줄을 뺐다.

위험: 지금 쓰는 소비자는 템플릿 하나이고, 템플릿은 1.0.0을 받는
변경에서 import를 함께 바꾼다. 배포한 버전이 없으니 깨질 다른 소비자는
없다.

검증: 남은 caskeleton 문자열은 build-logic 패키지(배포하지 않는 빌드
도구)뿐이다(git grep -i caskeleton).

BREAKING CHANGE: dev.caskeleton.messaging.* 타입이 dev.cakit.messaging.*로
옮겨졌다. import 접두사를 바꾸면 된다. Kafka 설정 키
caskeleton.messaging.credential.*은 cakit.messaging.credential.*이다.

Refs: design-docs repo-structure/05-library-repos.md 6.3절, 15절 변경(2026-11-08)
2026-11-08 16:11:52 +09:00

85 lines
4.2 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>
<!-- DM_GC: both tests are about what garbage collection does — a gauge that must survive a
collection instead of decaying to NaN through a weak reference, and a retained-set bound
measured between two collections. System.gc() is the request they exist to make. -->
<Match>
<Bug pattern="DM_GC"/>
<Or>
<And>
<Class name="dev.cakit.messaging.schema.json.PlatformOverheadPerformanceTest"/>
<Method name="aRoundTripDoesNotAllocateAGrowingRetainedSet"/>
</And>
</Or>
</Match>
</FindBugsFilter>