From 6b5518a9ed61e0a5cf64acfaf215bd4059d689c9 Mon Sep 17 00:00:00 2001 From: Federico Builes Date: Thu, 9 Jun 2022 10:33:05 +0200 Subject: [PATCH] Adding more docs to licenses.ts --- src/licenses.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/licenses.ts b/src/licenses.ts index eac01cd..f6e0be6 100644 --- a/src/licenses.ts +++ b/src/licenses.ts @@ -3,6 +3,11 @@ import {Change, ChangeSchema} from './schemas' /** * Loops through a list of changes, filtering and returning the * ones that don't conform to the licenses allow/deny lists. + * + * Keep in mind that we don't let users specify both an allow and a deny + * list in their config files, so this code works under the assumption that + * one of the two list parameters will be empty. If both lists are provided, + * we will ignore the deny list. * @param {Change[]} changes The list of changes to filter. * @param { { allow?: string[], deny?: string[]}} licenses An object with `allow`/`deny` keys, each containing a list of licenses. * @returns {Array