diff --git a/remix-analyzer/src/solidity-analyzer/index.ts b/remix-analyzer/src/solidity-analyzer/index.ts index cf23a684d0..d606bb14a0 100644 --- a/remix-analyzer/src/solidity-analyzer/index.ts +++ b/remix-analyzer/src/solidity-analyzer/index.ts @@ -18,7 +18,8 @@ export default class staticAnalysisRunner { */ run (compilationResult: CompilationResult, toRun: number[], callback: ((reports: AnalysisReport[]) => void)): void { const modules: ModuleObj[] = toRun.map((i) => { - const m: AnalyzerModule = this.modules()[i] + const module = this.modules()[i] + const m = new module() return { 'name': m.name, 'mod': m } }) this.runWithModuleList(compilationResult, modules, callback) diff --git a/remix-analyzer/src/solidity-analyzer/modules/list.ts b/remix-analyzer/src/solidity-analyzer/modules/list.ts index 3bb9c99c55..722c40c560 100644 --- a/remix-analyzer/src/solidity-analyzer/modules/list.ts +++ b/remix-analyzer/src/solidity-analyzer/modules/list.ts @@ -19,23 +19,23 @@ import deleteFromDynamicArray from './deleteFromDynamicArray' import forLoopIteratesOverDynamicArray from './forLoopIteratesOverDynamicArray' export default [ - new txOrigin(), - new gasCosts(), - new thisLocal(), - new checksEffectsInteraction(), - new constantFunctions(), - new similarVariableNames(), - new inlineAssembly(), - new blockTimestamp(), - new lowLevelCalls(), - new blockBlockhash(), - new noReturn(), - new selfdestruct(), - new guardConditions(), - new deleteDynamicArrays(), - new assignAndCompare(), - new erc20Decimals(), - new stringBytesLength(), - new deleteFromDynamicArray(), - new forLoopIteratesOverDynamicArray() + txOrigin, + gasCosts, + thisLocal, + checksEffectsInteraction, + constantFunctions, + similarVariableNames, + inlineAssembly, + blockTimestamp, + lowLevelCalls, + blockBlockhash, + noReturn, + selfdestruct, + guardConditions, + deleteDynamicArrays, + assignAndCompare, + erc20Decimals, + stringBytesLength, + deleteFromDynamicArray, + forLoopIteratesOverDynamicArray ]