Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
6e3d624
refactor: added custom checkbox for static analyser plugin
davidzagi Apr 10, 2021
b829de8
added warning sign when analysis has runned
davidzagi Apr 12, 2021
e765dd6
removed icon: fas fa-angle-double-right from each category display name
davidzagi Apr 12, 2021
74404c3
Merge branch 'master' into refactoring-static-analyser
tizah Apr 12, 2021
84bcd82
adding a condition to fix ci build
tizah Apr 13, 2021
a053eef
Merge branch 'master' into refactoring-static-analyser
tizah Apr 13, 2021
edf19b4
fix: testing to see if test passes
tizah Apr 16, 2021
c22fa5e
Merge branch 'refactoring-static-analyser' of https://github.com/ethe…
tizah Apr 16, 2021
3d8d939
added className staticAnalysisView to staticAnalyser component
tizah Apr 16, 2021
15b599c
remove className staticAnalysisView and added id = staticanalysisView
tizah Apr 16, 2021
47100bd
fix: moved staticanalysisButton id to the Button component
tizah Apr 17, 2021
f04fa3c
Merge branch 'master' into refactoring-static-analyser
tizah Apr 17, 2021
9c2bc3a
fix: removed disabled props on button
tizah Apr 17, 2021
60df389
Merge branch 'refactoring-static-analyser' of https://github.com/ethe…
tizah Apr 17, 2021
1a595bf
reversed changes
tizah Apr 17, 2021
81b7e38
commiting code to detect failing test
tizah Apr 17, 2021
ba090e2
removed comments
tizah Apr 17, 2021
d351f4c
removing comments and unused functions
tizah Apr 17, 2021
973de43
removed extra space at end of file
tizah Apr 17, 2021
a34e01c
added new line at end of file
tizah Apr 17, 2021
cacfc5c
added new line at end of file
tizah Apr 17, 2021
845cb3b
restored staticAnalysis.spec.ts to it previous code structure
tizah Apr 17, 2021
18cb9d4
fix failing test
tizah Apr 19, 2021
ffff4b3
Merge branch 'master' into refactoring-static-analyser
tizah Apr 22, 2021
40cb362
feat_fix_n_refactor: exptracted checkbox as a reusable component and …
tizah Apr 23, 2021
af07539
refactored warning message
tizah Apr 23, 2021
cbd56b3
fix editor highlighter
tizah Apr 24, 2021
a5d6aed
removed old staticAnalysis from remix-project
tizah Apr 25, 2021
b851b96
created actions and reducer to optimise code
tizah Apr 27, 2021
5a2aecb
Merge branch 'master' into refactoring-static-analyser
tizah Apr 27, 2021
36a37ef
refactored static analysis to improve performance
tizah Apr 27, 2021
de96cd2
Merge branch 'refactoring-static-analyser' of https://github.com/ethe…
tizah Apr 27, 2021
93b0e5f
refactor: added custom checkbox for static analyser plugin
davidzagi Apr 10, 2021
9b3eda8
added warning sign when analysis has runned
davidzagi Apr 12, 2021
5a6953c
removed icon: fas fa-angle-double-right from each category display name
davidzagi Apr 12, 2021
6f1d745
adding a condition to fix ci build
tizah Apr 13, 2021
5666d30
fix: testing to see if test passes
tizah Apr 16, 2021
219ff3a
added className staticAnalysisView to staticAnalyser component
tizah Apr 16, 2021
b17e8dc
remove className staticAnalysisView and added id = staticanalysisView
tizah Apr 16, 2021
450557f
fix: moved staticanalysisButton id to the Button component
tizah Apr 17, 2021
3d0f51c
fix: removed disabled props on button
tizah Apr 17, 2021
e50b0e5
reversed changes
tizah Apr 17, 2021
19de4ba
commiting code to detect failing test
tizah Apr 17, 2021
d1d9122
removed comments
tizah Apr 17, 2021
b88913f
removing comments and unused functions
tizah Apr 17, 2021
2887543
removed extra space at end of file
tizah Apr 17, 2021
f42daa2
added new line at end of file
tizah Apr 17, 2021
8cf8b84
added new line at end of file
tizah Apr 17, 2021
cb4c85c
restored staticAnalysis.spec.ts to it previous code structure
tizah Apr 17, 2021
8a85ae8
fix failing test
tizah Apr 19, 2021
1b39eb1
feat_fix_n_refactor: exptracted checkbox as a reusable component and …
tizah Apr 23, 2021
8479ad2
refactored warning message
tizah Apr 23, 2021
691f449
fix editor highlighter
tizah Apr 24, 2021
f6c9d97
removed old staticAnalysis from remix-project
tizah Apr 25, 2021
40973df
created actions and reducer to optimise code
tizah Apr 27, 2021
f486939
refactored static analysis to improve performance
tizah Apr 27, 2021
6046453
fix: filename not showing in the result `last result for:` section
tizah Apr 30, 2021
420dd82
fix: resolve conflict
tizah Apr 30, 2021
4d2db41
Merge branch 'master' into refactoring-static-analyser
tizah Apr 30, 2021
bf28e5b
Merge branch 'master' into refactoring-static-analyser
tizah Apr 30, 2021
525b654
Merge branch 'master' into refactoring-static-analyser
tizah May 3, 2021
12d3c18
Merge branch 'master' into refactoring-static-analyser
tizah May 3, 2021
f541d0c
Merge branch 'master' into refactoring-static-analyser
tizah May 4, 2021
15a549f
refactor: added custom checkbox for static analyser plugin
davidzagi Apr 10, 2021
4c03121
added warning sign when analysis has runned
davidzagi Apr 12, 2021
fcbf541
removed icon: fas fa-angle-double-right from each category display name
davidzagi Apr 12, 2021
5971471
adding a condition to fix ci build
tizah Apr 13, 2021
dcf510f
fix: testing to see if test passes
tizah Apr 16, 2021
8d2c912
added className staticAnalysisView to staticAnalyser component
tizah Apr 16, 2021
f6f279c
remove className staticAnalysisView and added id = staticanalysisView
tizah Apr 16, 2021
ef20331
fix: moved staticanalysisButton id to the Button component
tizah Apr 17, 2021
2a28a62
fix: removed disabled props on button
tizah Apr 17, 2021
7481756
reversed changes
tizah Apr 17, 2021
5fb870d
commiting code to detect failing test
tizah Apr 17, 2021
17c1257
removed comments
tizah Apr 17, 2021
cbb2c03
removing comments and unused functions
tizah Apr 17, 2021
9ab0288
removed extra space at end of file
tizah Apr 17, 2021
ef34146
added new line at end of file
tizah Apr 17, 2021
197eda9
added new line at end of file
tizah Apr 17, 2021
e6ae1d3
restored staticAnalysis.spec.ts to it previous code structure
tizah Apr 17, 2021
493511f
fix failing test
tizah Apr 19, 2021
6dfe730
feat_fix_n_refactor: exptracted checkbox as a reusable component and …
tizah Apr 23, 2021
6924eb4
refactored warning message
tizah Apr 23, 2021
d3cdaaf
fix editor highlighter
tizah Apr 24, 2021
a1ebf63
removed old staticAnalysis from remix-project
tizah Apr 25, 2021
43ae28e
created actions and reducer to optimise code
tizah Apr 27, 2021
369279c
refactored static analysis to improve performance
tizah Apr 27, 2021
fb1fc30
fix: filename not showing in the result `last result for:` section
tizah Apr 30, 2021
97663b3
rebasing to manually resolve conflicts
tizah May 5, 2021
2c0fa1d
added warning sign when analysis has runned
davidzagi Apr 12, 2021
aa943f4
commiting code to detect failing test
tizah Apr 17, 2021
9f20fe7
removed comments
tizah Apr 17, 2021
53d3e2a
removing comments and unused functions
tizah Apr 17, 2021
2804a0e
removed extra space at end of file
tizah Apr 17, 2021
64f995c
added new line at end of file
tizah Apr 17, 2021
80cce47
added new line at end of file
tizah Apr 17, 2021
2e16a23
restored staticAnalysis.spec.ts to it previous code structure
tizah Apr 17, 2021
420eb68
fix failing test
tizah Apr 19, 2021
ca85da3
feat_fix_n_refactor: exptracted checkbox as a reusable component and …
tizah Apr 23, 2021
1c22e15
refactored warning message
tizah Apr 23, 2021
68e41a9
fix editor highlighter
tizah Apr 24, 2021
01adc29
removed old staticAnalysis from remix-project
tizah Apr 25, 2021
2a5ffe1
created actions and reducer to optimise code
tizah Apr 27, 2021
7040108
refactored static analysis to improve performance
tizah Apr 27, 2021
2f31e64
resolving conflict manually from rebase
tizah May 5, 2021
7770ec3
resolving reducer conflicts
tizah May 5, 2021
6ff9baa
Merge branch 'master' into refactoring-static-analyser
tizah May 10, 2021
05698e2
Merge branch 'master' into refactoring-static-analyser
tizah May 12, 2021
304c674
Merge branch 'master' into refactoring-static-analyser
tizah May 12, 2021
bb2ca8f
Merge branch 'master' into refactoring-static-analyser
tizah May 12, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/remix-ide-e2e/src/tests/staticAnalysis.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function runTests (browser: NightwatchBrowser) {
.pause(10000)
.testContracts('Untitled.sol', sources[0]['Untitled.sol'], ['TooMuchGas', 'test1', 'test2'])
.clickLaunchIcon('solidityStaticAnalysis')
.click('#staticanalysisView button')
.click('#staticanalysisButton button')
.waitForElementPresent('#staticanalysisresult .warning', 2000, true, function () {
listSelectorContains(['Use of tx.origin',
'Fallback function of contract TooMuchGas requires too much gas',
Expand Down
58 changes: 43 additions & 15 deletions apps/remix-ide/src/app/tabs/analysis-tab.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import React from 'react' // eslint-disable-line
import { ViewPlugin } from '@remixproject/engine-web'
import ReactDOM from 'react-dom'
import { EventEmitter } from 'events'
import {RemixUiStaticAnalyser} from '@remix-ui/static-analyser' // eslint-disable-line
import * as packageJson from '../../../../../package.json'
var Renderer = require('../ui/renderer')

var yo = require('yo-yo')
var StaticAnalysis = require('./staticanalysis/staticAnalysisView')
var EventManager = require('../../lib/events')

const profile = {
Expand All @@ -25,23 +27,49 @@ class AnalysisTab extends ViewPlugin {
this.event = new EventManager()
this.events = new EventEmitter()
this.registry = registry
this.element = document.createElement('div')
this.element.setAttribute('id', 'staticAnalyserView')
this._components = {
renderer: new Renderer(this)
}
this._components.registry = this.registry
this._deps = {
offsetToLineColumnConverter: this.registry.get(
'offsettolinecolumnconverter').api
}
}

onActivation () {
this.renderComponent()
}

render () {
this.staticanalysis = new StaticAnalysis(this.registry, this)
this.staticanalysis.event.register('staticAnaysisWarning', (count) => {
if (count > 0) {
this.emit('statusChanged', { key: count, title: `${count} warning${count === 1 ? '' : 's'}`, type: 'warning' })
} else if (count === 0) {
this.emit('statusChanged', { key: 'succeed', title: 'no warning', type: 'success' })
} else {
// count ==-1 no compilation result
this.emit('statusChanged', { key: 'none' })
}
})
this.registry.put({ api: this.staticanalysis, name: 'staticanalysis' })
return this.element
}

return yo`<div class="px-3 pb-1" id="staticanalysisView">${this.staticanalysis.render()}</div>`
renderComponent () {
ReactDOM.render(
<RemixUiStaticAnalyser
analysisRunner={this.runner}
registry={this.registry}
staticanalysis={this.staticanalysis}
analysisModule={this}
event={this.event}
/>,
this.element,
() => {
this.event.register('staticAnaysisWarning', (count) => {
if (count > 0) {
this.emit('statusChanged', { key: count, title: `${count} warning${count === 1 ? '' : 's'}`, type: 'warning' })
} else if (count === 0) {
this.emit('statusChanged', { key: 'succeed', title: 'no warning', type: 'success' })
} else {
// count ==-1 no compilation result
this.emit('statusChanged', { key: 'none' })
}
})
}
)
}
}

Expand Down
302 changes: 0 additions & 302 deletions apps/remix-ide/src/app/tabs/staticanalysis/staticAnalysisView.js

This file was deleted.

Loading