Skip to content

Commit

Permalink
Merge pull request #622 from protofire/fix/reentrancy-rule-path
Browse files Browse the repository at this point in the history
fix: reentrancy rule path
  • Loading branch information
dbale-altoros authored Jan 1, 2025
2 parents 0d8b214 + a71d42a commit 46c9196
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions lib/rules/security/reentrancy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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],
},
],
},
Expand Down
4 changes: 2 additions & 2 deletions test/rules/security/reentrancy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' },
Expand All @@ -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' },
Expand Down

0 comments on commit 46c9196

Please sign in to comment.