Open fhg-isi opened 1 year ago
I tried to use it in a script, to maybe filter the output. However, its passed as a string and that does not feel as the way to go.
const lcc = require('license-compatibility-checker');
const path = require('path');
const packagePath = path.join(process.cwd(), 'package.json');
const modulePath = path.join(process.cwd(), 'node_modules');
lcc.check(
packagePath,
modulePath,
function(
/*error*/ err,
/*boolean*/ passed,
/*string*/ output
){
if (err) {
console.log(err);
throw err;
}
if (passed) {
console.log(output);
} else {
//potential license issues found
for (var entry in output){
}
console.log(output);
throw new Error('License issues found');
}
});
I would like to use license-compatiblity-checker in a CI pipeline/workfow. It should only fail if a new package with an incompatible license has been added.
Currently I get errors like
=> How can I manually allow some of the (unknown) licenses / add them to a whitelist?