Reject empty collection coverage

AI assistance: Codex validated and addressed the Greptile empty-collection review finding with focused regression coverage.
This commit is contained in:
Paul Bakaus
2026-07-30 09:43:58 -07:00
parent de9d543825
commit f274ca2c01
2 changed files with 42 additions and 1 deletions
+4 -1
View File
@@ -122,7 +122,10 @@ function hasCoverageValue(value) {
if (value && typeof value === 'object') {
return Object.values(value).some(hasCoverageValue);
}
if (typeof value === 'string') return value.trim().length > 0;
if (typeof value === 'string') {
const trimmed = value.trim();
return trimmed.length > 0 && !/^(?:\[\s*\]|\{\s*\})$/.test(trimmed);
}
return false;
}