From 3f06e8310d38dfb5ecfea30b904c69647c588cdf Mon Sep 17 00:00:00 2001 From: Joe Brislin Date: Wed, 18 Mar 2020 12:16:33 -0400 Subject: [PATCH] rubocop-0.76: updating cop names based on 0.76 release - https://github.com/rubocop-hq/rubocop/issues/7077 --- .gitignore | 10 ++++++++++ rubocop.yml | 21 +++++++++++++++++++-- 2 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..12807623a --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +# See https://help.github.com/articles/ignoring-files for more about ignoring files. +# +# If you find yourself ignoring temporary files generated by your text editor +# or operating system, you probably want to add a global ignore instead: +# git config --global core.excludesfile '~/.gitignore_global' + +# IDE Configs +.idea/ +.vscode/ +.rubocop-* diff --git a/rubocop.yml b/rubocop.yml index 24db40f05..264a2bc26 100644 --- a/rubocop.yml +++ b/rubocop.yml @@ -1,6 +1,7 @@ AllCops: Exclude: - bin/**/* + - config/environments/* - config/deploy/* - db/schema.rb - node_modules/**/* @@ -94,8 +95,8 @@ Layout/EndOfLine: EnforcedStyle: lf # Allow less whitespace in indentation -# https://github.com/rubocop-hq/rubocop/blob/master/manual/cops_layout.md#layoutalignparameters -Layout/AlignParameters: +# https://github.com/rubocop-hq/rubocop/blob/master/manual/cops_layout.md#layoutparameteralignment +Layout/ParameterAlignment: EnforcedStyle: with_fixed_indentation # Don't require empty lines between module and class lines @@ -125,6 +126,7 @@ Lint/AmbiguousBlockAssociation: # Allows lengthy describes in specs # https://github.com/rubocop-hq/rubocop/blob/master/manual/cops_metrics.md#metricsblocklength Metrics/BlockLength: + ExcludedMethods: ["included"] Exclude: - 'spec/**/*' @@ -164,6 +166,21 @@ Style/BlockDelimiters: Exclude: - 'spec/**/*' +# This cop checks for uses of each_key and each_value Hash methods +# https://rubocop.readthedocs.io/en/latest/cops_style/#stylehasheachmethods +Style/HashEachMethods: + Enabled: true + +# transforming the keys of a hash - Ruby 2.5 and newer +# https://rubocop.readthedocs.io/en/latest/cops_style/#stylehashtransformkeys +Style/HashTransformKeys: + Enabled: true + +# transforming the values of a hash - Ruby 2.4 and newer +# https://rubocop.readthedocs.io/en/latest/cops_style/#stylehashtransformvalues +Style/HashTransformValues: + Enabled: true + # Prefer compact style over exploded. # https://github.com/rubocop-hq/rubocop/blob/master/manual/cops_style.md#styleraiseargs Style/RaiseArgs: