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

check if slither is enabled

parent 464f0f65
...@@ -109,10 +109,12 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => { ...@@ -109,10 +109,12 @@ 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('solidity-logic', 'getCompilerState').then((compilerState) => { if(slitherEnabled) {
const { currentVersion, optimize, evmVersion } = compilerState props.analysisModule.call('solidity-logic', 'getCompilerState').then((compilerState) => {
props.analysisModule.call('slither', 'analyse', state.file, { currentVersion, optimize, evmVersion }).then(console.log) const { currentVersion, optimize, evmVersion } = compilerState
}) props.analysisModule.call('slither', 'analyse', state.file, { currentVersion, optimize, evmVersion }).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