Skip to content

Commit

Permalink
Add rule when variable name has a number
Browse files Browse the repository at this point in the history
  • Loading branch information
Jessiel Heitor Hacke authored and bbatsov committed Dec 8, 2016
1 parent 596d7b6 commit df41e1e
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2020,6 +2020,7 @@ no parameters.
:someSymbol
someVar = 5
var_10 = 10
def someMethod
# some code
Expand All @@ -2032,11 +2033,39 @@ no parameters.
# good
:some_symbol
some_var = 5
var10 = 10
def some_method
# some code
end
```
* <a name="snake-case-symbols-methods-vars-with-numbers"></a>
Do not separate numbers from letters on symbols, methods and variables.
<sup>[[link](#snake-case-symbols-methods-vars-with-numbers)]</sup>
```Ruby
# bad
:some_sym_1
some_var_1 = 1
def some_method_1
# some code
end
# good
:some_sym1
some_var1 = 1
def some_method1
# some code
end
```
* <a name="camelcase-classes"></a>
Use `CamelCase` for classes and modules. (Keep acronyms like HTTP, RFC, XML
uppercase.)
Expand Down

0 comments on commit df41e1e

Please sign in to comment.