From 77e0692f1594474b4485e0efec79d5d4b692b30f Mon Sep 17 00:00:00 2001 From: dbale-altoros Date: Wed, 1 Jan 2025 11:20:43 -0300 Subject: [PATCH] fix: reentrancy rule path --- lib/rules/security/reentrancy.js | 10 +++++----- ...ancy-invulenarble.js => reentrancy-invulnerable.js} | 0 ...entrancy-vulenarble.js => reentrancy-vulnerable.js} | 0 test/rules/security/reentrancy.js | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) rename test/fixtures/security/{reentrancy-invulenarble.js => reentrancy-invulnerable.js} (100%) rename test/fixtures/security/{reentrancy-vulenarble.js => reentrancy-vulnerable.js} (100%) diff --git a/lib/rules/security/reentrancy.js b/lib/rules/security/reentrancy.js index 32eef177..566f600a 100644 --- a/lib/rules/security/reentrancy.js +++ b/lib/rules/security/reentrancy.js @@ -15,25 +15,25 @@ const meta = { good: [ { description: 'Invulnerable Contract 1', - code: require('../../../test/fixtures/security/reentrancy-invulenarble')[0], + code: require('../../../test/fixtures/security/reentrancy-invulnerable')[0], }, { description: 'Invulnerable Contract 2', - code: require('../../../test/fixtures/security/reentrancy-invulenarble')[1], + code: require('../../../test/fixtures/security/reentrancy-invulnerable')[1], }, { description: 'Invulnerable Contract 3', - code: require('../../../test/fixtures/security/reentrancy-invulenarble')[2], + code: require('../../../test/fixtures/security/reentrancy-invulnerable')[2], }, ], bad: [ { description: 'Vulnerable Contract 1', - code: require('../../../test/fixtures/security/reentrancy-vulenarble')[0], + code: require('../../../test/fixtures/security/reentrancy-vulnerable')[0], }, { description: 'Vulnerable Contract 2', - code: require('../../../test/fixtures/security/reentrancy-vulenarble')[1], + code: require('../../../test/fixtures/security/reentrancy-vulnerable')[1], }, ], }, diff --git a/test/fixtures/security/reentrancy-invulenarble.js b/test/fixtures/security/reentrancy-invulnerable.js similarity index 100% rename from test/fixtures/security/reentrancy-invulenarble.js rename to test/fixtures/security/reentrancy-invulnerable.js diff --git a/test/fixtures/security/reentrancy-vulenarble.js b/test/fixtures/security/reentrancy-vulnerable.js similarity index 100% rename from test/fixtures/security/reentrancy-vulenarble.js rename to test/fixtures/security/reentrancy-vulnerable.js diff --git a/test/rules/security/reentrancy.js b/test/rules/security/reentrancy.js index f807f49f..2b5182b6 100644 --- a/test/rules/security/reentrancy.js +++ b/test/rules/security/reentrancy.js @@ -2,7 +2,7 @@ const linter = require('../../../lib/index') const { assertWarnsCount, assertErrorMessage, assertNoWarnings } = require('../../common/asserts') describe('Linter - reentrancy', () => { - require('../../fixtures/security/reentrancy-vulenarble').forEach((curCode) => + require('../../fixtures/security/reentrancy-vulnerable').forEach((curCode) => it('should return warn when code contains possible reentrancy', () => { const report = linter.processStr(curCode, { rules: { reentrancy: 'warn' }, @@ -13,7 +13,7 @@ describe('Linter - reentrancy', () => { }) ) - require('../../fixtures/security/reentrancy-invulenarble').forEach((curCode) => + require('../../fixtures/security/reentrancy-invulnerable').forEach((curCode) => it('should not return warn when code do not contains transfer', () => { const report = linter.processStr(curCode, { rules: { reentrancy: 'warn' },