0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

Anchored gscan rules to be checked against v2 rules

no issue

- This allows to bump gscan version in the future without breaking changes. The rule set will stay the same across versions
This commit is contained in:
Nazar Gargol 2019-10-16 13:05:51 +02:00
parent 9ca367f019
commit c34c8e9611

View file

@ -17,16 +17,20 @@ const check = function check(theme, isZip) {
if (isZip) {
checkPromise = gscan.checkZip(theme, {
keepExtractedDir: true
keepExtractedDir: true,
checkVersion: 'v2'
});
} else {
checkPromise = gscan.check(theme.path);
checkPromise = gscan.check(theme.path, {
checkVersion: 'v2'
});
}
return checkPromise
.then(function resultHandler(checkedTheme) {
checkedTheme = gscan.format(checkedTheme, {
onlyFatalErrors: config.get('env') === 'production'
onlyFatalErrors: config.get('env') === 'production',
checkVersion: 'v2'
});
return checkedTheme;