From b44b0f2c3b61beefbf5bcaadbf74f70137ded52e Mon Sep 17 00:00:00 2001 From: Koichi ITO Date: Sat, 22 Jul 2017 13:14:46 +0900 Subject: Fix RuboCop offenses and warnings --- .rubocop.yml | 88 ++++++++++++++++++++++++++++++------------------------------ 1 file changed, 44 insertions(+), 44 deletions(-) (limited to '.rubocop.yml') diff --git a/.rubocop.yml b/.rubocop.yml index 7b4478d3bd..452e1b1e7f 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -8,108 +8,108 @@ AllCops: - '**/vendor/**/*' - 'actionpack/lib/action_dispatch/journey/parser.rb' -# Prefer &&/|| over and/or. -Style/AndOr: - Enabled: true - -# Do not use braces for hash literals when they are the last argument of a -# method call. -Style/BracesAroundHashParameters: - Enabled: true - EnforcedStyle: context_dependent - # Align `when` with `case`. -Style/CaseIndentation: +Layout/CaseIndentation: Enabled: true # Align comments with method definitions. -Style/CommentIndentation: +Layout/CommentIndentation: Enabled: true # No extra empty lines. -Style/EmptyLines: +Layout/EmptyLines: Enabled: false # In a regular class definition, no empty lines around the body. -Style/EmptyLinesAroundClassBody: +Layout/EmptyLinesAroundClassBody: Enabled: true # In a regular method definition, no empty lines around the body. -Style/EmptyLinesAroundMethodBody: +Layout/EmptyLinesAroundMethodBody: Enabled: true # In a regular module definition, no empty lines around the body. -Style/EmptyLinesAroundModuleBody: - Enabled: true - -# Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }. -Style/HashSyntax: +Layout/EmptyLinesAroundModuleBody: Enabled: true # Method definitions after `private` or `protected` isolated calls need one # extra level of indentation. -Style/IndentationConsistency: +Layout/IndentationConsistency: Enabled: true EnforcedStyle: rails # Two spaces, no tabs (for indentation). -Style/IndentationWidth: +Layout/IndentationWidth: Enabled: true -Style/SpaceAfterColon: +Layout/SpaceAfterColon: Enabled: true -Style/SpaceAfterComma: +Layout/SpaceAfterComma: Enabled: true -Style/SpaceAroundEqualsInParameterDefault: +Layout/SpaceAroundEqualsInParameterDefault: Enabled: true -Style/SpaceAroundKeyword: +Layout/SpaceAroundKeyword: Enabled: true -Style/SpaceAroundOperators: +Layout/SpaceAroundOperators: Enabled: true -Style/SpaceBeforeFirstArg: +Layout/SpaceBeforeFirstArg: Enabled: true -# Defining a method with parameters needs parentheses. -Style/MethodDefParentheses: - Enabled: true - # Use `foo {}` not `foo{}`. -Style/SpaceBeforeBlockBraces: +Layout/SpaceBeforeBlockBraces: Enabled: true # Use `foo { bar }` not `foo {bar}`. -Style/SpaceInsideBlockBraces: +Layout/SpaceInsideBlockBraces: Enabled: true # Use `{ a: 1 }` not `{a:1}`. -Style/SpaceInsideHashLiteralBraces: +Layout/SpaceInsideHashLiteralBraces: Enabled: true -Style/SpaceInsideParens: +Layout/SpaceInsideParens: Enabled: true -# Check quotes usage according to lint rule below. -Style/StringLiterals: - Enabled: true - EnforcedStyle: double_quotes - # Detect hard tabs, no hard tabs. -Style/Tab: +Layout/Tab: Enabled: true # Blank lines should not have any spaces. -Style/TrailingBlankLines: +Layout/TrailingBlankLines: Enabled: true # No trailing whitespace. -Style/TrailingWhitespace: +Layout/TrailingWhitespace: Enabled: true +# Prefer &&/|| over and/or. +Style/AndOr: + Enabled: true + +# Do not use braces for hash literals when they are the last argument of a +# method call. +Style/BracesAroundHashParameters: + Enabled: true + EnforcedStyle: context_dependent + +# Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }. +Style/HashSyntax: + Enabled: true + +# Defining a method with parameters needs parentheses. +Style/MethodDefParentheses: + Enabled: true + +# Check quotes usage according to lint rule below. +Style/StringLiterals: + Enabled: true + EnforcedStyle: double_quotes + # Use quotes for string literals when they are enough. Style/UnneededPercentQ: Enabled: true -- cgit v1.2.3