fix(core): update

This commit is contained in:
2021-05-17 15:46:59 +00:00
parent 6477b8a375
commit 40d12bc91e
10 changed files with 110 additions and 34 deletions

View File

@@ -7,7 +7,7 @@ export class LicenseChecker {
async excludeLicenseWithinPath(pathArg: string, licenseArrayArg: string[]) {
const checkResult = new CheckResult();
const plainResultArray = await this.createPlainResultArray(pathArg);
plainResultArray.forEach(licenseResult => {
plainResultArray.forEach((licenseResult) => {
if (licenseArrayArg.indexOf(licenseResult.license) === -1) {
checkResult.addPassing(licenseResult);
} else {
@@ -20,7 +20,7 @@ export class LicenseChecker {
async includeLicencesWithinPath(pathArg: string, licenseArrayArg: string[]) {
const checkResult = new CheckResult();
const plainResultArray = await this.createPlainResultArray(pathArg);
plainResultArray.forEach(licenseResult => {
plainResultArray.forEach((licenseResult) => {
if (licenseArrayArg.indexOf(licenseResult.license) !== -1) {
checkResult.addPassing(licenseResult);
} else {
@@ -42,7 +42,7 @@ export class LicenseChecker {
license: refObject.licenses,
path: refObject.path,
publisher: refObject.publisher,
repository: refObject.repository
repository: refObject.repository,
});
}
return resultArray;
@@ -52,7 +52,7 @@ export class LicenseChecker {
const done = plugins.smartpromise.defer<any>();
licenseChecker.init(
{
start: checkPathArg
start: checkPathArg,
},
(err, licenseJson) => {
if (err) {