Skip to content

Commit 91aab2f

Browse files
committed
feat(dynamite): Warn about unused coverage ignore patterns from config
Signed-off-by: provokateurin <kate@provokateurin.de>
1 parent b041b43 commit 91aab2f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/dynamite/dynamite/lib/src/openapi_builder.dart

+7-1
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,16 @@ class OpenAPIBuilder implements Builder {
9999
for (final ignore in coverageIgnores) {
100100
final pattern = RegExp(ignore);
101101

102-
outputString = outputString.replaceAllMapped(
102+
final before = outputString;
103+
outputString = before.replaceAllMapped(
103104
pattern,
104105
(match) => ' // coverage:ignore-start\n${match.group(0)}\n // coverage:ignore-end',
105106
);
107+
if (outputString == before) {
108+
log.warning(
109+
'Coverage ignore pattern $ignore did not match anything',
110+
);
111+
}
106112
}
107113
}
108114

0 commit comments

Comments
 (0)