Skip to content

Commit d82c332

Browse files
committed
add properties to aid badge color change
1 parent 72f17bf commit d82c332

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

apps/remix-ide/src/app/tabs/analysis-tab.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ class AnalysisTab extends ViewPlugin {
3838
}
3939
this.dispatch = null
4040
this.hints = []
41+
this.basicEnabled = false
42+
this.solhintEnabled = false
43+
this.slitherEnabled = false
4144
}
4245

4346
async onActivation () {
@@ -50,14 +53,14 @@ class AnalysisTab extends ViewPlugin {
5053
this.event.register('staticAnaysisWarning', (count) => {
5154
let payloadType = ''
5255
const error = this.hints?.find(hint => hint.type === 'error')
53-
if (error) {
56+
if (error && this.solhintEnabled) {
5457
payloadType = 'error'
5558
} else {
5659
payloadType = 'warning'
5760
}
5861

5962
if (count > 0) {
60-
this.emit('statusChanged', { key: count, title: payloadType === 'error' ? `You have ${count} problem${count === 1 ? '' : 's'}` : 'You have some warnings', type: payloadType })
63+
this.emit('statusChanged', { key: count, title: payloadType === 'error' ? `You have ${count} problem${count === 1 ? '' : 's'}` : `You have ${count} warnings`, type: payloadType })
6164
} else if (count === 0) {
6265
this.emit('statusChanged', { key: 'succeed', title: 'no warnings or errors', type: 'success' })
6366
} else {

0 commit comments

Comments
 (0)