From 6ef0671faf5fb092add294b6c7d7085937f32054 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Thu, 10 Jun 2021 13:33:59 +0530 Subject: [PATCH] run slither analysis by passing path --- .../static-analyser/src/lib/remix-ui-static-analyser.tsx | 2 +- libs/remixd/src/services/slitherClient.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx b/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx index 8060310c46..e415633fa8 100644 --- a/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx +++ b/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx @@ -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 diff --git a/libs/remixd/src/services/slitherClient.ts b/libs/remixd/src/services/slitherClient.ts index 11fe69ef5e..988c07cfda 100644 --- a/libs/remixd/src/services/slitherClient.ts +++ b/libs/remixd/src/services/slitherClient.ts @@ -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 = ''