linting fixed for remix-analyzer

pull/4771/head
lianahus 7 months ago
parent 4ecaca9218
commit f5cdc389a7
  1. 5
      libs/remix-analyzer/test/analysis/staticAnalysisCommon-test.ts
  2. 3
      libs/remix-analyzer/test/analysis/staticAnalysisIntegration-test-0.5.0.ts
  3. 4
      libs/remix-analyzer/test/analysis/staticAnalysisIssues-test-0.4.24.ts
  4. 2
      libs/remix-analyzer/test/analysis/staticAnalysisIssues-test-0.5.0.ts

@ -1,4 +1,4 @@
import { default as test} from "tape"
import { default as test } from "tape"
import * as common from '../../src/solidity-analyzer/modules/staticAnalysisCommon'
const { localCall, thisLocalCall, libCall, externalDirect, superLocal, assignment, abiNamespaceCallNodes,
inlineAssembly, unaryOperation, nowAst, blockTimestamp, stateVariableContractNode,
@ -6,7 +6,6 @@ const { localCall, thisLocalCall, libCall, externalDirect, superLocal, assignmen
// eslint-disable-next-line @typescript-eslint/no-var-requires
lowlevelCall, parameterFunction, parameterFunctionCall, inheritance, blockHashAccess, contractDefinition, funcDefForComplexParams } = require('./astBlocks')
// eslint-disable-next-line @typescript-eslint/no-var-requires
const compiledContractObj = require('./compilationDetails/CompiledContractObj.json')
function escapeRegExp (str) {
@ -89,7 +88,7 @@ test('staticAnalysisCommon.helpers.operator', function (t) {
test('staticAnalysisCommon.helpers.nodeType', function (t) {
t.plan(3)
const node = { nodeType: 'Identifier', name: 'now'}
const node = { nodeType: 'Identifier', name: 'now' }
const node2 = { nodeType: 'FunctionCall', memberName: 'call' }
t.ok(common.helpers.nodeType(node, common.nodeTypes.IDENTIFIER), 'should work for identifier')

@ -53,9 +53,6 @@ test('setup', function (t) {
})
});
test('Integration test thisLocal module', function (t: test.Test) {
t.plan(testFiles.length)
const module: any = modules.thisLocal

@ -31,9 +31,9 @@ test('staticAnalysisIssues.functionParameterPassingError', function (t) {
const statRunner: StatRunner = new StatRunner()
t.doesNotThrow(() => {
statRunner.runWithModuleList(res, [{ name: new Module().name, mod: new Module()}])
statRunner.runWithModuleList(res, [{ name: new Module().name, mod: new Module() }])
}, 'Analysis should not throw')
const reports = statRunner.runWithModuleList(res, [{ name: new Module().name, mod: new Module()}])
const reports = statRunner.runWithModuleList(res, [{ name: new Module().name, mod: new Module() }])
t.ok(!reports.some((mod: AnalysisReport) => mod.report.some((rep: AnalysisReportObj) => rep.warning.includes('INTERNAL ERROR')), 'Should not have internal errors'))
})

@ -6,7 +6,7 @@ import { default as StatRunner } from '../../src/solidity-analyzer'
import solc from 'solc';
import { CompilationResult, AnalysisReportObj, AnalysisReport } from '../../src/types'
import { checksEffectsInteraction } from '../../src/solidity-analyzer/modules/'
const {compilerInput } = helpers.compiler
const { compilerInput } = helpers.compiler
const folder: string = 'solidity-v0.5'
let compiler

Loading…
Cancel
Save