Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Toolchain
sgc
Commits
b9f50418
Commit
b9f50418
authored
Aug 31, 2018
by
Philipp Nowinski
Browse files
[FEATURE] add notification for linting error
parent
baad40b7
Changes
3
Hide whitespace changes
Inline
Side-by-side
core/logger.js
View file @
b9f50418
...
...
@@ -84,6 +84,7 @@ module.exports = class Logger {
summary
:
_title
,
body
:
_message
,
icon
:
path
.
join
(
__dirname
,
'
SGC.svg
'
),
sound
:
'
message-new-instant
'
}).
push
();
}
else
{
notifier
.
notify
(
...
...
core/tasks/css.js
View file @
b9f50418
...
...
@@ -194,7 +194,8 @@ module.exports = class Css extends Task {
configBasedir
:
`
${
process
.
cwd
()}
/sgc-core/`
}),
reporter
({
clearReportedMessages
:
true
clearReportedMessages
:
true
,
throwError
:
true
})
]).
process
(
file
,
{
from
:
_input
,
...
...
@@ -202,7 +203,8 @@ module.exports = class Css extends Task {
}).
then
(()
=>
{
resolve
();
}).
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
();
});
});
}
...
...
core/tasks/js.js
View file @
b9f50418
...
...
@@ -169,7 +169,9 @@ module.exports = class Js extends Task {
});
let
formatter
=
cli
.
getFormatter
();
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
));
resolve
();
});
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment