From 34f6a130d8f8b2982001c2dbe547730ce66945cc Mon Sep 17 00:00:00 2001 From: Andre Medeiros Date: Thu, 30 Aug 2018 13:50:36 -0400 Subject: [PATCH] Update complexity --- lib/modules/coverage/contract_source.js | 2 +- lib/modules/coverage/source_map.js | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/modules/coverage/contract_source.js b/lib/modules/coverage/contract_source.js index 3ca94478..5b25e360 100644 --- a/lib/modules/coverage/contract_source.js +++ b/lib/modules/coverage/contract_source.js @@ -97,7 +97,7 @@ class ContractSource { } } - /*eslint complexity: ["error", 36]*/ + /*eslint complexity: ["error", 38]*/ generateCodeCoverage(trace) { if(!this.ast || !this.contractBytecode) throw new Error('Error generating coverage: solc output was not assigned'); diff --git a/lib/modules/coverage/source_map.js b/lib/modules/coverage/source_map.js index 6795d0e4..3406645c 100644 --- a/lib/modules/coverage/source_map.js +++ b/lib/modules/coverage/source_map.js @@ -1,14 +1,13 @@ -class EmptySourceMap { - static createRelativeTo(sourceMapString) { +const EmptySourceMap = { + createRelativeTo: function(sourceMapString) { if(sourceMapString === '') return EmptySourceMap; return new SourceMap(sourceMapString); - } - - static toString() { + }, + toString: function() { return ''; } -} +}; class SourceMap { constructor(sourceMapStringOrOffset, length, id, jump) {