check if slither is enabled

pull/1398/head
aniket-engg 3 years ago committed by Aniket
parent 464f0f650d
commit bc6ef25444
  1. 10
      libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx

@ -109,10 +109,12 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => {
if (lastCompilationResult && categoryIndex.length > 0) {
let warningCount = 0
const warningMessage = []
props.analysisModule.call('solidity-logic', 'getCompilerState').then((compilerState) => {
const { currentVersion, optimize, evmVersion } = compilerState
props.analysisModule.call('slither', 'analyse', state.file, { currentVersion, optimize, evmVersion }).then(console.log)
})
if(slitherEnabled) {
props.analysisModule.call('solidity-logic', 'getCompilerState').then((compilerState) => {
const { currentVersion, optimize, evmVersion } = compilerState
props.analysisModule.call('slither', 'analyse', state.file, { currentVersion, optimize, evmVersion }).then(console.log)
})
}
runner.run(lastCompilationResult, categoryIndex, results => {
results.map((result) => {
let moduleName

Loading…
Cancel
Save