Merge pull request #1445 from ethereum/analysis-modules-list

analyser module listing updated
pull/7/head
yann300 5 years ago committed by GitHub
commit b765422ed0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      remix-analyzer/src/solidity-analyzer/index.ts
  2. 38
      remix-analyzer/src/solidity-analyzer/modules/list.ts

@ -18,7 +18,8 @@ export default class staticAnalysisRunner {
*/ */
run (compilationResult: CompilationResult, toRun: number[], callback: ((reports: AnalysisReport[]) => void)): void { run (compilationResult: CompilationResult, toRun: number[], callback: ((reports: AnalysisReport[]) => void)): void {
const modules: ModuleObj[] = toRun.map((i) => { 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 } return { 'name': m.name, 'mod': m }
}) })
this.runWithModuleList(compilationResult, modules, callback) this.runWithModuleList(compilationResult, modules, callback)

@ -19,23 +19,23 @@ import deleteFromDynamicArray from './deleteFromDynamicArray'
import forLoopIteratesOverDynamicArray from './forLoopIteratesOverDynamicArray' import forLoopIteratesOverDynamicArray from './forLoopIteratesOverDynamicArray'
export default [ export default [
new txOrigin(), txOrigin,
new gasCosts(), gasCosts,
new thisLocal(), thisLocal,
new checksEffectsInteraction(), checksEffectsInteraction,
new constantFunctions(), constantFunctions,
new similarVariableNames(), similarVariableNames,
new inlineAssembly(), inlineAssembly,
new blockTimestamp(), blockTimestamp,
new lowLevelCalls(), lowLevelCalls,
new blockBlockhash(), blockBlockhash,
new noReturn(), noReturn,
new selfdestruct(), selfdestruct,
new guardConditions(), guardConditions,
new deleteDynamicArrays(), deleteDynamicArrays,
new assignAndCompare(), assignAndCompare,
new erc20Decimals(), erc20Decimals,
new stringBytesLength(), stringBytesLength,
new deleteFromDynamicArray(), deleteFromDynamicArray,
new forLoopIteratesOverDynamicArray() forLoopIteratesOverDynamicArray
] ]

Loading…
Cancel
Save