run slither analysis by passing path

pull/1398/head
aniket-engg 4 years ago committed by Aniket
parent 0672234f5e
commit 6ef0671faf
  1. 2
      libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx
  2. 4
      libs/remixd/src/services/slitherClient.ts

@ -108,7 +108,7 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => {
if (lastCompilationResult && categoryIndex.length > 0) {
let warningCount = 0
const warningMessage = []
props.analysisModule.call('slither', 'analyse', state.file).then(console.log)
runner.run(lastCompilationResult, categoryIndex, results => {
results.map((result) => {
let moduleName

@ -26,8 +26,8 @@ export class SlitherClient extends PluginClient {
const errMsg = '[Slither Analysis]: Cannot analyse in read-only mode'
return reject(new Error(errMsg))
}
const outputFile = 'slither-report.json'
const cmd = `slither ${filePath} --disable-solc-warnings --json ${outputFile}`
const outputFile = 'remix-slitherReport_' + Date.now() + '.json'
const cmd = `slither ${filePath} --json ${outputFile}`
const options = { cwd: this.currentSharedFolder, shell: true }
const child = spawn(cmd, options)
let result = ''

Loading…
Cancel
Save