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

linting fix

parent 1c6facc3
/* eslint dot-notation: "off" */
import * as WS from 'ws' // eslint-disable-line
import { PluginClient } from '@remixproject/plugin'
import { existsSync, readFileSync } from 'fs'
......@@ -24,8 +26,8 @@ export class SlitherClient extends PluginClient {
transform (detectors) {
const standardReport = []
for (let e of detectors) {
let obj = {}
for (const e of detectors) {
const obj = {}
obj['description'] = e['description']
obj['title'] = e.check
obj['confidence'] = e.confidence
......@@ -66,20 +68,10 @@ export class SlitherClient extends PluginClient {
const solcArgs = optimizeOption || evmOption ? `--solc-args '${optimizeOption}${evmOption}'` : ''
const cmd = `slither ${filePath} ${solcArgs} --json ${outputFile}`
const child = spawn(cmd, options)
let result = ''
let error = ''
let response = {}
child.stdout.on('data', (data) => {
const msg = `[Slither Analysis]: ${data.toString()}`
console.log('\x1b[32m%s\x1b[0m', msg)
result += msg + '\n'
})
child.stderr.on('data', (err) => {
error += `[Slither Analysis]: ${err.toString()}`
})
const response = {}
child.on('close', () => {
const outputFileAbsPath = `${this.currentSharedFolder}/${outputFile}`
if (existsSync (outputFileAbsPath)) {
if (existsSync(outputFileAbsPath)) {
let report = readFileSync(outputFileAbsPath, 'utf8')
report = JSON.parse(report)
if (report['success']) {
......
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