From f8530980c47d7a6d951aa173d9d7eb5b2499b9d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ladislav=20Slez=C3=A1k?= Date: Thu, 9 Jun 2016 14:17:43 +0200 Subject: [PATCH] Update the Rubocop config to make it work with Rubocop 0.40.0 --- ytools/y2tool/rubocop_yast_style.yml | 44 +++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/ytools/y2tool/rubocop_yast_style.yml b/ytools/y2tool/rubocop_yast_style.yml index 676a20fd..55ff722c 100644 --- a/ytools/y2tool/rubocop_yast_style.yml +++ b/ytools/y2tool/rubocop_yast_style.yml @@ -10,9 +10,12 @@ # Disabled, would require too many changes in the current code #Lint/EndAlignment: -# StyleGuide: https://github.com/SUSE/style-guides/blob/master/Ruby.md#lintendalignment +# StyleGuide: https://github.com/SUSE/style-guides/blob/master/Ruby.md#lintendalignment # AlignWith: variable +AllCops: + TargetRubyVersion: 2.1 + Metrics/AbcSize: StyleGuide: https://github.com/SUSE/style-guides/blob/master/Ruby.md#metricsabcsize Max: 30 @@ -199,3 +202,42 @@ Style/AsciiComments: # Style/DoubleNegation: Enabled: false + +# New Rubocop uses a different default ("special_inside_parentheses") +# which adds too much indentation in some cases. Use the backward compatible value. +Style/IndentArray: + EnforcedStyle: consistent + +# Use the backward compatible default +Lint/EndAlignment: + AlignWith: start_of_line + +# Allow block.call: +# +# def foo(&block) +# var = block,call +# ... +# +# is better readable than +# +# def foo +# var = yield +# ... +# +# athough it is a bit slower +Performance/RedundantBlockCall: + Enabled: false + +# Use the backward compatible default +Style/MultilineMethodCallIndentation: + EnforcedStyle: indented + +# Do not check the module length, the YCP converted includes +# are usually too long. +Metrics/ModuleLength: + Enabled: false + +# Disable the "foo.size == 0" check, Yast::Term does not provide #empty? +Style/ZeroLengthPredicate: + Enabled: false +