Add rubocop default configuration
This commit is contained in:
parent
0bdeda4a05
commit
8c158aa778
1 changed files with 31 additions and 0 deletions
31
config/rubocop.yml
Normal file
31
config/rubocop.yml
Normal file
|
@ -0,0 +1,31 @@
|
|||
AllCops:
|
||||
Includes:
|
||||
- '../**/*.rake'
|
||||
Excludes:
|
||||
- '../vendor/**'
|
||||
|
||||
# Avoid parameter lists longer than five parameters.
|
||||
ParameterLists:
|
||||
Max: 3
|
||||
CountKeywordArgs: true
|
||||
|
||||
# Avoid more than `Max` levels of nesting.
|
||||
BlockNesting:
|
||||
Max: 3
|
||||
|
||||
# Align with the style guide.
|
||||
CollectionMethods:
|
||||
PreferredMethods:
|
||||
collect: 'map'
|
||||
inject: 'reduce'
|
||||
find: 'detect'
|
||||
find_all: 'select'
|
||||
|
||||
# Do not force public/protected/private keyword to be indented at the same
|
||||
# level as the def keyword. My personal preference is to outdent these keywords
|
||||
# because I think when scanning code it makes it easier to identify the
|
||||
# sections of code and visually separate them. When the keyword is at the same
|
||||
# level I think it sort of blends in with the def keywords and makes it harder
|
||||
# to scan the code and see where the sections are.
|
||||
AccessControl:
|
||||
Enabled: false
|
Loading…
Add table
Reference in a new issue