Skip to content

Commit

Permalink
Merge pull request #1 from dawanda/improve_rubocop_yml
Browse files Browse the repository at this point in the history
Improve rubocop yml
  • Loading branch information
Dany Marcoux authored Mar 27, 2017
2 parents 82e4cf3 + 3a16e5e commit 93cbced
Showing 1 changed file with 26 additions and 23 deletions.
49 changes: 26 additions & 23 deletions rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This file only lists settings that are different from the default ones as all configurations inherit from default options linked below
# https://github.com/bbatsov/rubocop/blob/master/config/default.yml

AllCops:
# Cop names are displayed in offense messages.
DisplayCopNames: true
Expand All @@ -6,38 +9,47 @@ AllCops:

############################## DISABLED ##############################

Style/Documentation:
Description: 'Document classes and non-namespace modules.'
Enabled: false

Style/AlignArray:
Description: Align the elements of an array literal if they span more than one line.
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays'
Enabled: false

Style/AsciiComments:
# Align the elements of a hash literal if they span more than one line.
Style/AlignHash:
Enabled: false

Style/NumericLiterals:
Style/AsciiComments:
Enabled: false

Style/BracesAroundHashParameters:
Description: 'Enforce braces style around hash parameters.'
Enabled: false

Style/Documentation:
Description: 'Document classes and non-namespace modules.'
Enabled: false

Style/IndentHash:
Description: 'Checks the indentation of the first key in a hash literal.'
Enabled: false

# Align the elements of a hash literal if they span more than one line.
Style/AlignHash:
Style/Lambda:
Enabled: false

Style/Lambda:
Style/NumericLiterals:
Enabled: false

############################## ENABLED ##############################

Metrics/LineLength:
Max: 120

Metrics/MethodLength:
Max: 20 # It would be better to have it set to 10 according to our style guide, but for now 20 will do...

Metrics/ParameterLists:
Max: 4

Style/Alias:
EnforcedStyle: prefer_alias_method

Expand All @@ -60,12 +72,6 @@ Style/AlignParameters:
- with_first_parameter
- with_fixed_indentation

Style/MultilineOperationIndentation:
EnforcedStyle: indented

Style/SpaceAroundOperators:
AllowForAlignment: true

Style/BlockDelimiters:
EnforcedStyle: semantic
FunctionalMethods:
Expand All @@ -82,14 +88,11 @@ Style/BlockDelimiters:
- xit
- specify

Metrics/ParameterLists:
Max: 4

Metrics/MethodLength:
Max: 20 # It would be better to have it set to 10 according to our style guide, but for now 20 will do...

Metrics/LineLength:
Max: 120
Style/MultilineOperationIndentation:
EnforcedStyle: indented

Style/SignalException:
EnforcedStyle: semantic

Style/SpaceAroundOperators:
AllowForAlignment: true

0 comments on commit 93cbced

Please sign in to comment.