From 76132e6650be747a69a18fbc48cc6de7127401f2 Mon Sep 17 00:00:00 2001 From: Mac Siri Date: Wed, 27 Jun 2018 09:54:09 -0400 Subject: [PATCH] Update .rubocop.yml (#499) --- .rubocop.yml | 40 ++++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 17c65164a..181c4b32c 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -15,7 +15,6 @@ RSpec/DescribeClass: AllCops: Exclude: - db/schema.rb - TargetRubyVersion: 2.5.0 Naming/AccessorMethodName: Description: Check the naming of accessor methods for get_/set_. @@ -221,9 +220,9 @@ Style/LineEndConcatenation: Enabled: false Metrics/LineLength: - Description: 'Limit lines to 100 characters.' + Description: 'Limit lines to 80 characters.' StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#80-character-limits' - Max: 100 + Max: 80 Metrics/MethodLength: Description: 'Avoid methods longer than 10 lines of code.' @@ -367,8 +366,18 @@ Style/TrailingCommaInArguments: - no_comma Enabled: true -Style/TrailingCommaInLiteral: - Description: 'Checks for trailing comma in array and hash literals.' +Style/TrailingCommaInArrayLiteral: + Description: 'Checks for trailing comma in array literals.' + StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas' + EnforcedStyleForMultiline: comma + SupportedStylesForMultiline: + - comma + - consistent_comma + - no_comma + Enabled: true + +Style/TrailingCommaInHashLiteral: + Description: 'Checks for trailing comma in hash literals.' StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas' EnforcedStyleForMultiline: comma SupportedStylesForMultiline: @@ -413,6 +422,13 @@ Layout/AlignParameters: StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-double-indent' Enabled: false +Layout/ConditionPosition: + Description: >- + Checks for condition placed in a confusing position relative to + the keyword. + StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#same-line-condition' + Enabled: false + Layout/DotPosition: Description: 'Checks the position of the dot in multi-line method calls.' StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains' @@ -465,13 +481,6 @@ Lint/CircularArgumentReference: Description: "Don't refer to the keyword argument in the default value." Enabled: false -Lint/ConditionPosition: - Description: >- - Checks for condition placed in a confusing position relative to - the keyword. - StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#same-line-condition' - Enabled: false - Lint/DeprecatedClassMethods: Description: 'Check for deprecated class method calls.' Enabled: false @@ -497,6 +506,10 @@ Lint/HandleExceptions: StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions' Enabled: false +Lint/LiteralAsCondition: + Description: 'Checks of literals used in conditions.' + Enabled: false + Lint/LiteralInInterpolation: Description: 'Checks for literals used in interpolation.' Enabled: false @@ -534,7 +547,7 @@ Lint/UnderscorePrefixedVariableName: Description: 'Do not use prefix `_` for a variable that is used.' Enabled: false -Lint/UnneededDisable: +Lint/UnneededCopDisableDirective: Description: >- Checks for rubocop:disable comments that can be removed. Note: this cop is not disabled when disabling all cops. @@ -649,4 +662,3 @@ Rails/TimeZone: Rails/Validation: Description: 'Use validates :attribute, hash of validations.' Enabled: false -