Repository: protofire/solhint
Pull request #622 (2025-01-01 14:21:59)

fix: reentrancy rule path


Patch:
diff --git a/lib/rules/security/reentrancy.js b/lib/rules/security/reentrancy.js
index 32eef17..566f600 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],
         },
       ],
     },


Test patch:
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 f807f49..2b5182b 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' },