From 702ee7d2224454ce075a36962ba0bb846f498b26 Mon Sep 17 00:00:00 2001 From: Dany Marcoux Date: Mon, 27 Mar 2017 14:25:10 +0200 Subject: [PATCH 1/2] Add comment about default options --- rubocop.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rubocop.yml b/rubocop.yml index 599e318..6292dd2 100644 --- a/rubocop.yml +++ b/rubocop.yml @@ -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 From 3a16e5e787a41bd59b3c6d5f7b06a685d65c60e7 Mon Sep 17 00:00:00 2001 From: Dany Marcoux Date: Mon, 27 Mar 2017 14:33:01 +0200 Subject: [PATCH 2/2] Order cops alphabetically by name --- rubocop.yml | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/rubocop.yml b/rubocop.yml index 6292dd2..b79dd47 100644 --- a/rubocop.yml +++ b/rubocop.yml @@ -9,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 @@ -63,12 +72,6 @@ Style/AlignParameters: - with_first_parameter - with_fixed_indentation -Style/MultilineOperationIndentation: - EnforcedStyle: indented - -Style/SpaceAroundOperators: - AllowForAlignment: true - Style/BlockDelimiters: EnforcedStyle: semantic FunctionalMethods: @@ -85,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