Fix paths/paths-ignore warning that would appear unconditionally

This commit is contained in:
Henry Mercer 2024-01-11 11:54:24 +00:00
parent 3b54300140
commit 94e68911d7
3 changed files with 5 additions and 5 deletions

4
lib/init.js generated
View file

@ -69,8 +69,8 @@ exports.runInit = runInit;
function printPathFiltersWarning(config, logger) {
// Index include/exclude/filters only work in javascript/python/ruby.
// If any other languages are detected/configured then show a warning.
if ((config.originalUserInput.paths?.length !== 0 ||
config.originalUserInput["paths-ignore"]?.length !== 0) &&
if ((config.originalUserInput.paths ||
config.originalUserInput["paths-ignore"]) &&
!config.languages.every(languages_1.isScannedLanguage)) {
logger.warning('The "paths"/"paths-ignore" fields of the config only have effect for JavaScript, Python, and Ruby');
}