Skip to content

Commit

Permalink
single word constant variables trigger snake case error #11
Browse files Browse the repository at this point in the history
  • Loading branch information
idrabenia committed Nov 17, 2017
1 parent ea4a01f commit 125596a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ https://consensys.github.io/smart-contract-best-practices/recommendations/)
| **func-param-name-mixedcase** | Function param name must be in mixedCase |
| **var-name-mixedcase** | Variable name must be in mixedCase |
| **event-name-camelcase** | Event name must be in CamelCase |
| **const-name-snakecase** | Constant name must be in SCREAMING_SNAKE_CASE |
| **const-name-snakecase** | Constant name must be in capitalized SNAKE_CASE |
| **modifier-name-mixedcase** | Modifier name must be in mixedCase |
| **contract-name-camelcase** | Contract name must be in CamelCase |
| **use-forbidden-name** | Avoid to use letters 'I', 'l', 'O' as identifiers |
Expand Down
2 changes: 1 addition & 1 deletion docs/rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ description: List of validation rules for Solhint - Solidity security, style gui
| **func-param-name-mixedcase** | Function param name must be in mixedCase | *[default](#options)* |
| **var-name-mixedcase** | Variable name must be in mixedCase | *[default](#options)* |
| **event-name-camelcase** | Event name must be in CamelCase | *[default](#options)* |
| **const-name-snakecase** | Constant name must be in SCREAMING_SNAKE_CASE | *[default](#options)* |
| **const-name-snakecase** | Constant name must be in capitalized SNAKE_CASE | *[default](#options)* |
| **modifier-name-mixedcase** | Modifier name must be in mixedCase | *[default](#options)* |
| **contract-name-camelcase** | Contract name must be in CamelCase | *[default](#options)* |
| **use-forbidden-name** | Avoid to use letters 'I', 'l', 'O' as identifiers | *[default](#options)* |
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/naming/var-name-style.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class VarNameStyleChecker extends BaseChecker {
validateConstantName(ctx) {
this._forEachIdentifier(ctx, (curId, text) => {
if (naming.isNotUpperSnakeCase(text)) {
this.error(curId, 'const-name-snakecase', 'Constant name must be in SCREAMING_SNAKE_CASE');
this.error(curId, 'const-name-snakecase', 'Constant name must be in capitalized SNAKE_CASE');
}
});
}
Expand Down

0 comments on commit 125596a

Please sign in to comment.