Files
messaging-library/config/spotbugs/exclude-test.xml
T
DongHyeonka 2e9298ec33 build: 템플릿 밖에서 혼자 빌드·배포되는 Gradle 루트를 만든다
옮겨 온 메시징 19개 모듈은 템플릿의 src/settings.gradle·build-logic·
카탈로그·registry에 기대고 있어 이 repo만으로는 빌드되지 않는다.
repo 루트를 Gradle 루트로 하는 단독 빌드를 만든다.

- build-logic/: grpc-library main 2e880c7의 줄인 사본(템플릿
  22df3525에서 복사, 템플릿 2959eff0까지의 변경도 같은 내용)에서
  gRPC BOM 규칙(ca.grpc-platform-module)만 뺐다. 배포 플러그인
  ca.library-publishing과 서명 키 해석(SigningKeys)은 그대로다.
  출처·뺀 것·고친 것은 build-logic/UPSTREAM.md.
- settings.gradle·build.gradle·gradle.properties: group
  dev.cakit.messaging, 단계 태스크 ci·mainCheck·releaseCheck와
  배포(release·releaseRehearsal·verifySigningKey)는 grpc-library와
  같은 모양이다. 메시징만 다른 점: Buf가 없고, 성능 lane이 없고,
  mainCheck와 releaseCheck가 브로커 인증 증거 게이트
  (verifyMessagingCertificationEvidence)를 부른다. 템플릿은 이 게이트를
  따로 messaging-certification.yml로 돌렸다. 그 workflow는 지운다.
- config/: registry 19행(source_path만 messaging/<leaf>로), 메시징
  클래스만 남긴 SpotBugs 제외 목록, 이미지 셋(postgres-16, kafka,
  toxiproxy, 모두 digest 고정), checkstyle 사본.
- gradle/libs.versions.toml: 메시징이 쓰는 항목만(avro, cloudevents,
  protobuf 4.33.2, toxiproxy, jmh)과 kafka-clients가 끌고 오는 취약
  버전을 덮는 pinned-lz4-java·pinned-snappy-java.
- 저장소 계약 테스트: MessagingPublicSurfaceContractTest(템플릿
  app-bootstrap에서 이력째 옮김)와 새 MessagingSettingsOwnerContractTest
  (app.messaging 주인은 starter 하나)를 messaging-testkit의
  repositoryContractTest lane에 둔다. check에 들어가 PR 단계에서 돈다.
- messaging-kafka: 인증 manifest 경로를 새 배치로 고친다.

버린 대안: 계약 테스트를 build-logic 테스트로 두는 안. 빌드 플러그인
시험과 모듈 계약이 섞이고, 소스·build.gradle을 입력으로 선언하는
기존 lane 장치를 쓸 수 없다.

위험: 이 커밋 단독으로는 lockfile을 다시 쓰지 않았다(뒤 커밋에서
desktop에서 쓴다). 패키지는 아직 dev.caskeleton.messaging이다.

검증: desktop ./gradlew projects rc=0(19개 모듈 포함).

Refs: design-docs repo-structure/05-library-repos.md 4·10.3·13.1절
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.caskeleton.messaging.schema.json.PlatformOverheadPerformanceTest"/>
<Method name="aRoundTripDoesNotAllocateAGrowingRetainedSet"/>
</And>
</Or>
</Match>
</FindBugsFilter>