Move validation of chromium/preferences_schema.json to its own gulp task

With the way that the `default_preferences.json` file is now generated at build time, the `gulp lint` task is now noticeably slower than before. This slowdown has been, and still is, somewhat annoying during the deployment of new ESLint rules.

Hence this patch, which moves the `chromium/preferences_schema.json` validation from `gulp lint` and into a new `gulp lint-chromium` task instead. *Obviously* this new task is run as part of the `gulp npm-test` task, and thus through `npm test` on Node.js/Travis, such that it's still being tested as before.
This commit is contained in:
Jonas Jenwald 2020-02-16 10:42:07 +01:00
parent 4092aa9fbd
commit 9fd2402321

View File

@ -1389,9 +1389,7 @@ gulp.task(
}) })
); );
gulp.task( gulp.task("lint", function(done) {
"lint",
gulp.series("default_preferences", function(done) {
console.log(); console.log();
console.log("### Linting JS files"); console.log("### Linting JS files");
@ -1409,9 +1407,16 @@ gulp.task(
done(new Error("ESLint failed.")); done(new Error("ESLint failed."));
return; return;
} }
console.log("files checked, no errors found");
done();
});
});
gulp.task(
"lint-chromium",
gulp.series("default_preferences", function(done) {
console.log(); console.log();
console.log("### Checking supplemental files"); console.log("### Checking supplemental Chromium files");
if ( if (
!checkChromePreferencesFile( !checkChromePreferencesFile(
@ -1422,10 +1427,7 @@ gulp.task(
done(new Error("chromium/preferences_schema is not in sync.")); done(new Error("chromium/preferences_schema is not in sync."));
return; return;
} }
console.log("files checked, no errors found");
done(); done();
});
}) })
); );
@ -1838,5 +1840,8 @@ gulp.task("externaltest", function(done) {
gulp.task( gulp.task(
"npm-test", "npm-test",
gulp.series(gulp.parallel("lint", "externaltest"), "unittestcli") gulp.series(
gulp.parallel("lint", "externaltest", "unittestcli"),
"lint-chromium"
)
); );