You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.
The audit should fail when the license auditor is configured with a malformed validator function.
To reproduce
Steps to reproduce the behavior:
Create .licenses.config.ts with the following contents:
constVALID_LICENSES="(MIT|Apache-2.0|0BSD|BSD-[2-3]-Clause|ISC)";constVALIDATOR=newRegExp(`^(${VALID_LICENSES}|\\(${VALID_LICENSES}( OR ${VALID_LICENSES})*\\))$`);/* Test what happens when the auditor is misconfigured. The correct configuration would be: * module.exports = { isValidLicense: (license) => VALIDATOR.test(license) }; */module.exports={isValidLicense: VALIDATOR.test};
Describe the bug
The audit should fail when the license auditor is configured with a malformed validator function.
To reproduce
Steps to reproduce the behavior:
.licenses.config.ts
with the following contents:yarn set version 3.0.0
to install Yarn 3.0.0.yarn add --dev [email protected]
.yarn licenses audit --output-file=reports/junit/licenses.xml --config=.licenses.config.ts --loose
.echo $?
to see that the audit succeeded, exiting with code 0.reports/junit/licenses.xml
contains:Expected behavior
I expected the audit to fail because the license validator function itself was invalid.
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: