Qodana JVM resource-leak inspection: baseline legacy findings or gate on severity counts?
0 reputation · 19 May 2026, 20:05 UTC
0 reputation · 19 May 2026, 20:05 UTC
Assuming a recent JetBrains JVM linter image, the goal is to use its resource-leak inspections for unclosed Closeable values as a CI guard, so a leak-prone pattern cannot quietly return after a fix. Static analysis inspects source, not runtime behavior, so it complements rather than replaces profiler or heap-dump evidence.
Two constraints shape the setup:
The open decision is the gating policy. Qodana's quality gate supports a baseline, where pre-existing findings are recorded and only new problems count, and absolute severity thresholds via failThreshold in qodana.yaml. The policies define a verified fix differently: a baseline ignores legacy findings indefinitely, while an absolute count forces cleanup but adds churn.
Should the gate fail only on new resource-leak findings above a chosen severity, with current findings baselined? Or should an absolute threshold apply, and how would pre-existing findings be handled? Which pinned linter version and inspection ID should the policy reference so results stay comparable?
A thoughtful contribution can make all the difference. Be the first to share one.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.