api-extractor: warn about unnecessarily allowing warnings
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -241,7 +241,6 @@ const ALLOW_WARNINGS = [
|
||||
'plugins/kafka',
|
||||
'plugins/kafka-backend',
|
||||
'plugins/kubernetes',
|
||||
'plugins/kubernetes-backend',
|
||||
'plugins/kubernetes-common',
|
||||
'plugins/lighthouse',
|
||||
'plugins/newrelic',
|
||||
@@ -566,6 +565,11 @@ async function runApiExtraction({
|
||||
`The API Report for ${packageDir} is not allowed to have warnings`,
|
||||
);
|
||||
}
|
||||
if (warningCountAfter === 0 && ALLOW_WARNINGS.includes(packageDir)) {
|
||||
console.log(
|
||||
`No need to allow warnings for ${packageDir}, it does not have any`,
|
||||
);
|
||||
}
|
||||
if (warningCountAfter > warningCountBefore) {
|
||||
warnings.push(
|
||||
`The API Report for ${packageDir} introduces new warnings. ` +
|
||||
|
||||
Reference in New Issue
Block a user