Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return suppressionItems.filter(s =>
it.some(it.isArray(s.from) ? s.from : [s.from], from =>
isSubPath(urlReversed, splitPathAndReverse(from))
)
)
return suppressionItems.filter(s =>
it.some(it.isArray(s.from) ? s.from : [s.from], from =>
isSubPath(urlReversed, splitPathAndReverse(from))
)
)
await cliSuppressExceptions(async () => {
log.debug(argv.toString())
const specPath = argv.specPath
const vOptions: validate.Options = {
consoleLogLevel: argv.logLevel,
logFilepath: argv.f,
pretty: argv.p
}
if (specPath.match(/.*composite.*/gi) !== null) {
const result = await validate.validateCompositeSpec(specPath, vOptions)
return iterator.some(result, v => !v.validityStatus) ? 1 : 0
} else {
const result = await validate.validateSpec(specPath, vOptions)
return result.validityStatus ? 0 : 1
}
})
}
export function existSuppression(
specPath: string,
suppression: amd.Suppression,
id: string
): boolean {
if (suppression.directive !== undefined) {
const suppressionArray = getSuppressionArray(specPath, suppression.directive)
return it.some(suppressionArray, s => s.suppress === id)
}
return false
}