From 5721411542856d9fb5e2d0a8802e24aa3087e5ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=BDeljko=20Filipin?= Date: Wed, 12 Nov 2014 15:14:55 +0100 Subject: [PATCH] Prepare repository for RuboCop 'rubocop --auto-gen-config' has a bug which cause a style to be enabled in the todo file when it should really be disabled. Hence manually disabled Style/MultilineOperationIndentation. Filled upstream as: https://github.com/bbatsov/rubocop/issues/1449 Bug: 72841 Change-Id: I5a2007de1f62d5d82910319a918728b499929996 --- .rubocop.yml | 1 + .rubocop_todo.yml | 207 ++++++++++++++++++++++++++++++++++++++++++++++ Gemfile | 3 + Gemfile.lock | 25 ++++++ 4 files changed, 236 insertions(+) create mode 100644 .rubocop.yml create mode 100644 .rubocop_todo.yml create mode 100644 Gemfile create mode 100644 Gemfile.lock diff --git a/.rubocop.yml b/.rubocop.yml new file mode 100644 index 000000000..cc32da4b9 --- /dev/null +++ b/.rubocop.yml @@ -0,0 +1 @@ +inherit_from: .rubocop_todo.yml diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml new file mode 100644 index 000000000..5fb54e143 --- /dev/null +++ b/.rubocop_todo.yml @@ -0,0 +1,207 @@ +# This configuration was generated by `rubocop --auto-gen-config` +# on 2014-11-17 22:08:46 +0100 using RuboCop version 0.27.1. +# The point is for the user to remove these configuration records +# one by one as the offenses are removed from the code base. +# Note that changes in the inspected code, or installation of new +# versions of RuboCop, may require this file to be generated again. + +# Offense count: 4 +# Cop supports --auto-correct. +Lint/UnusedBlockArgument: + Enabled: false + +# Offense count: 3 +Metrics/AbcSize: + Max: 166 + +# Offense count: 3 +Metrics/CyclomaticComplexity: + Max: 60 + +# Offense count: 31 +# Configuration parameters: AllowURI, URISchemes. +Metrics/LineLength: + Max: 133 + +# Offense count: 3 +# Configuration parameters: CountComments. +Metrics/MethodLength: + Max: 162 + +# Offense count: 2 +Metrics/PerceivedComplexity: + Max: 48 + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles. +Style/AndOr: + Enabled: false + +# Offense count: 1 +Style/AsciiComments: + Enabled: false + +# Offense count: 8 +# Cop supports --auto-correct. +Style/Blocks: + Enabled: false + +# Offense count: 2 +# Cop supports --auto-correct. +Style/CommentIndentation: + Enabled: false + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: AllowAdjacentOneLineDefs. +Style/EmptyLineBetweenDefs: + Enabled: false + +# Offense count: 1 +# Cop supports --auto-correct. +Style/EmptyLines: + Enabled: false + +# Offense count: 3 +# Configuration parameters: MaxLineLength. +Style/IfUnlessModifier: + Enabled: false + +# Offense count: 1 +# Cop supports --auto-correct. +Style/IndentArray: + Enabled: false + +# Offense count: 6 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles. +Style/IndentHash: + Enabled: false + +# Offense count: 94 +# Cop supports --auto-correct. +# Configuration parameters: Width. +Style/IndentationWidth: + Enabled: false + +# Offense count: 13 +# Cop supports --auto-correct. +# Configuration parameters: SupportedStyles. +Style/MethodDefParentheses: + EnforcedStyle: require_no_parentheses + +# Offense count: 13 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles. +Style/MultilineOperationIndentation: + Enabled: false + +# Offense count: 1 +# Cop supports --auto-correct. +Style/NegatedIf: + Enabled: false + +# Offense count: 2 +# Configuration parameters: EnforcedStyle, MinBodyLength, SupportedStyles. +Style/Next: + Enabled: false + +# Offense count: 2 +# Cop supports --auto-correct. +Style/NilComparison: + Enabled: false + +# Offense count: 6 +# Cop supports --auto-correct. +# Configuration parameters: PreferredDelimiters. +Style/PercentLiteralDelimiters: + Enabled: false + +# Offense count: 1 +Style/RegexpLiteral: + MaxSlashes: 3 + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles. +Style/SignalException: + Enabled: false + +# Offense count: 2 +# Cop supports --auto-correct. +Style/SpaceAfterComma: + Enabled: false + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: SupportedStyles. +Style/SpaceAroundEqualsInParameterDefault: + EnforcedStyle: no_space + +# Offense count: 8 +# Cop supports --auto-correct. +Style/SpaceAroundOperators: + Enabled: false + +# Offense count: 21 +# Cop supports --auto-correct. +# Configuration parameters: SupportedStyles. +Style/SpaceBeforeBlockBraces: + EnforcedStyle: no_space + +# Offense count: 22 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters. +Style/SpaceInsideBlockBraces: + Enabled: false + +# Offense count: 24 +# Cop supports --auto-correct. +Style/SpaceInsideBrackets: + Enabled: false + +# Offense count: 18 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SupportedStyles. +Style/SpaceInsideHashLiteralBraces: + Enabled: false + +# Offense count: 6 +# Cop supports --auto-correct. +Style/SpaceInsideParens: + Enabled: false + +# Offense count: 8 +# Cop supports --auto-correct. +Style/SpecialGlobalVars: + Enabled: false + +# Offense count: 5 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles. +Style/StringLiterals: + Enabled: false + +# Offense count: 393 +# Cop supports --auto-correct. +Style/Tab: + Enabled: false + +# Offense count: 2 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles. +Style/TrailingBlankLines: + Enabled: false + +# Offense count: 5 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyleForMultiline, SupportedStyles. +Style/TrailingComma: + Enabled: false + +# Offense count: 2 +# Cop supports --auto-correct. +# Configuration parameters: WordRegex. +Style/WordArray: + MinSize: 2 diff --git a/Gemfile b/Gemfile new file mode 100644 index 000000000..f601a7c6f --- /dev/null +++ b/Gemfile @@ -0,0 +1,3 @@ +source "https://rubygems.org" + +gem "rubocop", require: false diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 000000000..a5a0e1977 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,25 @@ +GEM + remote: https://rubygems.org/ + specs: + ast (2.0.0) + astrolabe (1.3.0) + parser (>= 2.2.0.pre.3, < 3.0) + parser (2.2.0.pre.7) + ast (>= 1.1, < 3.0) + slop (~> 3.4, >= 3.4.5) + powerpack (0.0.9) + rainbow (2.0.0) + rubocop (0.27.1) + astrolabe (~> 1.3) + parser (>= 2.2.0.pre.7, < 3.0) + powerpack (~> 0.0.6) + rainbow (>= 1.99.1, < 3.0) + ruby-progressbar (~> 1.4) + ruby-progressbar (1.7.0) + slop (3.6.0) + +PLATFORMS + ruby + +DEPENDENCIES + rubocop