Skip to content

Commit ba351f3

Browse files
authored
Update index.js
1 parent 56b120f commit ba351f3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

scripts/solhint-custom/index.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,11 @@ module.exports = [
7474
if (node.visibility === 'internal' && node.parent.kind === 'library' && /^_/.test(node.name)) {
7575
this.error(node, 'Library internal functions should not have leading underscore');
7676
}
77-
if (node.visibility === 'public' || node.visibility === 'external' && /^_/.test(node.name)) {
78-
this.error(node, 'Public and external functions should not have leading underscore');
77+
if (node.visibility === 'public' && /^_/.test(node.name)) {
78+
this.error(node, 'Public functions should not have leading underscore');
79+
}
80+
if (node.visibility === 'external' && /^_/.test(node.name)) {
81+
this.error(node, 'External functions should not have leading underscore');
7982
}
8083
}
8184
},

0 commit comments

Comments
 (0)