Commit b9f50418 authored by Philipp Nowinski's avatar Philipp Nowinski
Browse files

[FEATURE] add notification for linting error

parent baad40b7
...@@ -84,6 +84,7 @@ module.exports = class Logger { ...@@ -84,6 +84,7 @@ module.exports = class Logger {
summary: _title, summary: _title,
body: _message, body: _message,
icon: path.join(__dirname, 'SGC.svg'), icon: path.join(__dirname, 'SGC.svg'),
sound: 'message-new-instant'
}).push(); }).push();
} else { } else {
notifier.notify( notifier.notify(
......
...@@ -194,7 +194,8 @@ module.exports = class Css extends Task { ...@@ -194,7 +194,8 @@ module.exports = class Css extends Task {
configBasedir: `${process.cwd()}/sgc-core/` configBasedir: `${process.cwd()}/sgc-core/`
}), }),
reporter({ reporter({
clearReportedMessages: true clearReportedMessages: true,
throwError: true
}) })
]).process(file, { ]).process(file, {
from: _input, from: _input,
...@@ -202,7 +203,8 @@ module.exports = class Css extends Task { ...@@ -202,7 +203,8 @@ module.exports = class Css extends Task {
}).then(() => { }).then(() => {
resolve(); resolve();
}).catch(error => { }).catch(error => {
this._logger.error(error.stack) this._logger.displayNotification('SGC css:qa task', 'You have some linting-errors in your CSS. Please fix them!');
resolve();
}); });
}); });
} }
......
...@@ -169,7 +169,9 @@ module.exports = class Js extends Task { ...@@ -169,7 +169,9 @@ module.exports = class Js extends Task {
}); });
let formatter = cli.getFormatter(); let formatter = cli.getFormatter();
let report = cli.executeOnFiles(_files); let report = cli.executeOnFiles(_files);
if (report.errorCount > 0) {
this._logger.displayNotification('SGC js:qa task', 'You have some linting-errors in your JavaScript. Please fix them!');
}
console.log(formatter(report.results)); console.log(formatter(report.results));
resolve(); resolve();
}); });
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment