diff --git a/src/app/tabs/compile-tab.js b/src/app/tabs/compile-tab.js index 9d7b71e0f5..7b85d9708a 100644 --- a/src/app/tabs/compile-tab.js +++ b/src/app/tabs/compile-tab.js @@ -35,6 +35,7 @@ module.exports = class CompileTab { maxTime: 1000, timeout: 300 } + self._opts.config.set('hideWarnings', false) self._events.editor.register('contentChanged', scheduleCompilation) self._events.editor.register('sessionSwitched', scheduleCompilation) function scheduleCompilation () { @@ -113,7 +114,13 @@ module.exports = class CompileTab { if (data.errors && data.errors.length) { error = true data.errors.forEach(function (err) { - self._opts.renderer.error(err.formattedMessage, self._view.errorContainer, {type: err.severity}) + if (self._opts.config.get('hideWarnings')) { + if (err.severity !== 'warning') { + self._opts.renderer.error(err.formattedMessage, self._view.errorContainer, {type: err.severity}) + } + } else { + self._opts.renderer.error(err.formattedMessage, self._view.errorContainer, {type: err.severity}) + } }) } if (!error && data.contracts) { @@ -137,6 +144,7 @@ module.exports = class CompileTab { self._view.compileIcon = yo`` self._view.compileButton = yo`