Merge main into update-actions-github.

This commit is contained in:
Chris Gavin 2020-09-21 15:25:08 +01:00
commit bba73b6d4e
No known key found for this signature in database
GPG key ID: 07F950B80C27E4DA
19 changed files with 81 additions and 46 deletions

8
lib/config-utils.js generated
View file

@ -468,23 +468,23 @@ async function loadConfig(languagesInput, queriesInput, configFile, repository,
if (!(parsedYAML[PATHS_IGNORE_PROPERTY] instanceof Array)) {
throw new Error(getPathsIgnoreInvalid(configFile));
}
parsedYAML[PATHS_IGNORE_PROPERTY].forEach((path) => {
for (const path of parsedYAML[PATHS_IGNORE_PROPERTY]) {
if (typeof path !== "string" || path === "") {
throw new Error(getPathsIgnoreInvalid(configFile));
}
pathsIgnore.push(validateAndSanitisePath(path, PATHS_IGNORE_PROPERTY, configFile, logger));
});
}
}
if (PATHS_PROPERTY in parsedYAML) {
if (!(parsedYAML[PATHS_PROPERTY] instanceof Array)) {
throw new Error(getPathsInvalid(configFile));
}
parsedYAML[PATHS_PROPERTY].forEach((path) => {
for (const path of parsedYAML[PATHS_PROPERTY]) {
if (typeof path !== "string" || path === "") {
throw new Error(getPathsInvalid(configFile));
}
paths.push(validateAndSanitisePath(path, PATHS_PROPERTY, configFile, logger));
});
}
}
// The list of queries should not be empty for any language. If it is then
// it is a user configuration error.