Commit ea8e6e80 authored by aniket-engg's avatar aniket-engg Committed by Aniket

get compiler state in analyzer

parent 6ef0671f
...@@ -7,6 +7,7 @@ const profile = { ...@@ -7,6 +7,7 @@ const profile = {
name: 'solidity-logic', name: 'solidity-logic',
displayName: 'Solidity compiler logic', displayName: 'Solidity compiler logic',
description: 'Compile solidity contracts - Logic', description: 'Compile solidity contracts - Logic',
methods: ['getCompilerState'],
version: packageJson.version version: packageJson.version
} }
...@@ -68,6 +69,10 @@ class CompileTab extends Plugin { ...@@ -68,6 +69,10 @@ class CompileTab extends Plugin {
this.compiler.set('language', lang) this.compiler.set('language', lang)
} }
getCompilerState (lang) {
return this.compiler.state
}
/** /**
* Compile a specific file of the file manager * Compile a specific file of the file manager
* @param {string} target the path to the file to compile * @param {string} target the path to the file to compile
......
...@@ -108,7 +108,8 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => { ...@@ -108,7 +108,8 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => {
if (lastCompilationResult && categoryIndex.length > 0) { if (lastCompilationResult && categoryIndex.length > 0) {
let warningCount = 0 let warningCount = 0
const warningMessage = [] const warningMessage = []
props.analysisModule.call('slither', 'analyse', state.file).then(console.log) props.analysisModule.call('solidity-logic', 'getCompilerState').then(console.log)
// props.analysisModule.call('slither', 'analyse', state.file).then(console.log)
runner.run(lastCompilationResult, categoryIndex, results => { runner.run(lastCompilationResult, categoryIndex, results => {
results.map((result) => { results.map((result) => {
let moduleName let moduleName
......
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