rails/.rubocop.yml

341 lines
6.3 KiB
YAML
Raw Permalink Normal View History

2019-06-06 05:38:19 +00:00
require:
- rubocop-minitest
- rubocop-packaging
2019-06-06 05:38:19 +00:00
- rubocop-performance
- rubocop-rails
Bump RuboCop to 0.67.2 Performance cops will be extracted from RuboCop to RuboCop Performance when next RuboCop 0.68 will be released. https://github.com/rubocop-hq/rubocop/issues/5977 RuboCop 0.67 is its transition period. Since rails/rails repository uses Performance cops, This PR added rubocop-performance gem to Gemfile. And this PR fixes some offenses using the following auto-correct. ```console % bundle exec rubocop -a Offenses: activerecord/test/cases/connection_adapters/connection_handlers_multi_db_test.rb:212:26: C: [Corrected] Layout/SpaceAroundOperators: Operator = > should be surrounded by a single space. "primary" => { adapter: "sqlite3", database: "db/primary.sqlite3" } ^^ activerecord/test/cases/connection_adapters/connection_handlers_multi_db_test.rb:239:26: C: [Corrected] Layout/SpaceAroundOperators: Operator => should be surrounded by a single space. "primary" => { adapter: "sqlite3", database: "db/primary.sqlite3" } ^^ actionview/test/template/resolver_shared_tests.rb:1:1: C: [Corrected] Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true. module ResolverSharedTests ^ actionview/test/template/resolver_shared_tests.rb:10:33: C: [Corrected] Layout/SpaceAroundEqualsInParameterDefault: Surrounding space missing in default value assignment. def with_file(filename, source="File at #{filename}") ^ actionview/test/template/resolver_shared_tests.rb:106:5: C: [Corrected] Rails/RefuteMethods: Prefer assert_not_same over refute_same. refute_same a, b ^^^^^^^^^^^ 2760 files inspected, 5 offenses detected, 5 offenses corrected ```
2019-04-16 08:05:50 +00:00
AllCops:
TargetRubyVersion: 2.7
2016-08-06 15:45:37 +00:00
# RuboCop has a bunch of cops enabled by default. This setting tells RuboCop
2016-08-07 11:06:51 +00:00
# to ignore them, so only the ones explicitly set in this file are enabled.
DisabledByDefault: true
2021-01-26 23:41:59 +00:00
SuggestExtensions: false
2016-08-06 15:45:37 +00:00
Exclude:
- '**/tmp/**/*'
2016-08-06 15:45:37 +00:00
- '**/templates/**/*'
- '**/vendor/**/*'
- 'actionpack/lib/action_dispatch/journey/parser.rb'
2018-12-24 20:16:22 +00:00
- 'actionmailbox/test/dummy/**/*'
2019-01-05 00:43:11 +00:00
- 'actiontext/test/dummy/**/*'
- '**/node_modules/**/*'
Performance:
Exclude:
- '**/test/**/*'
# Prefer assert_not over assert !
Rails/AssertNot:
Include:
- '**/test/**/*'
# Prefer assert_not_x over refute_x
Rails/RefuteMethods:
Include:
- '**/test/**/*'
Rails/IndexBy:
Enabled: true
Rails/IndexWith:
Enabled: true
2016-08-06 15:45:37 +00:00
# Prefer &&/|| over and/or.
Style/AndOr:
2016-07-20 03:35:11 +00:00
Enabled: true
2016-08-06 15:45:37 +00:00
# Align `when` with `case`.
rubocop namespace changes from `Style` to `Layout` Refer https://github.com/bbatsov/rubocop/pull/4278/commits/54166bf76ba76b14f1bbc8a34165f175dbc3f227 for the commit ``` /path/to/rails/.rubocop.yml: Style/CaseIndentation has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/CommentIndentation has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLines has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundClassBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundMethodBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundModuleBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/IndentationConsistency has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/IndentationWidth has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAfterColon has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAfterComma has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundEqualsInParameterDefault has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundKeyword has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundOperators has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceBeforeFirstArg has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceBeforeBlockBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideBlockBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideHashLiteralBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideParens has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/Tab has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/TrailingBlankLines has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/TrailingWhitespace has the wrong namespace - should be Layout ```
2017-05-24 18:33:50 +00:00
Layout/CaseIndentation:
2016-07-20 03:35:11 +00:00
Enabled: true
Layout/ClosingHeredocIndentation:
Enabled: true
Layout/ClosingParenthesisIndentation:
Enabled: true
# Align comments with method definitions.
rubocop namespace changes from `Style` to `Layout` Refer https://github.com/bbatsov/rubocop/pull/4278/commits/54166bf76ba76b14f1bbc8a34165f175dbc3f227 for the commit ``` /path/to/rails/.rubocop.yml: Style/CaseIndentation has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/CommentIndentation has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLines has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundClassBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundMethodBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundModuleBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/IndentationConsistency has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/IndentationWidth has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAfterColon has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAfterComma has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundEqualsInParameterDefault has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundKeyword has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundOperators has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceBeforeFirstArg has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceBeforeBlockBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideBlockBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideHashLiteralBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideParens has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/Tab has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/TrailingBlankLines has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/TrailingWhitespace has the wrong namespace - should be Layout ```
2017-05-24 18:33:50 +00:00
Layout/CommentIndentation:
Enabled: true
Layout/ElseAlignment:
Enabled: true
# Align `end` with the matching keyword or starting expression except for
# assignments, where it should be aligned with the LHS.
Layout/EndAlignment:
Enabled: true
EnforcedStyleAlignWith: variable
AutoCorrect: true
Layout/EndOfLine:
Enabled: true
Layout/EmptyLineAfterMagicComment:
Enabled: true
Layout/EmptyLinesAroundAccessModifier:
Enabled: true
EnforcedStyle: only_before
Layout/EmptyLinesAroundBlockBody:
Enabled: true
2016-08-06 15:45:37 +00:00
# In a regular class definition, no empty lines around the body.
rubocop namespace changes from `Style` to `Layout` Refer https://github.com/bbatsov/rubocop/pull/4278/commits/54166bf76ba76b14f1bbc8a34165f175dbc3f227 for the commit ``` /path/to/rails/.rubocop.yml: Style/CaseIndentation has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/CommentIndentation has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLines has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundClassBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundMethodBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundModuleBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/IndentationConsistency has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/IndentationWidth has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAfterColon has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAfterComma has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundEqualsInParameterDefault has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundKeyword has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundOperators has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceBeforeFirstArg has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceBeforeBlockBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideBlockBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideHashLiteralBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideParens has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/Tab has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/TrailingBlankLines has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/TrailingWhitespace has the wrong namespace - should be Layout ```
2017-05-24 18:33:50 +00:00
Layout/EmptyLinesAroundClassBody:
2016-07-20 03:35:11 +00:00
Enabled: true
# In a regular method definition, no empty lines around the body.
rubocop namespace changes from `Style` to `Layout` Refer https://github.com/bbatsov/rubocop/pull/4278/commits/54166bf76ba76b14f1bbc8a34165f175dbc3f227 for the commit ``` /path/to/rails/.rubocop.yml: Style/CaseIndentation has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/CommentIndentation has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLines has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundClassBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundMethodBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundModuleBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/IndentationConsistency has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/IndentationWidth has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAfterColon has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAfterComma has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundEqualsInParameterDefault has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundKeyword has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundOperators has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceBeforeFirstArg has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceBeforeBlockBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideBlockBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideHashLiteralBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideParens has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/Tab has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/TrailingBlankLines has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/TrailingWhitespace has the wrong namespace - should be Layout ```
2017-05-24 18:33:50 +00:00
Layout/EmptyLinesAroundMethodBody:
Enabled: true
2016-08-06 15:45:37 +00:00
# In a regular module definition, no empty lines around the body.
rubocop namespace changes from `Style` to `Layout` Refer https://github.com/bbatsov/rubocop/pull/4278/commits/54166bf76ba76b14f1bbc8a34165f175dbc3f227 for the commit ``` /path/to/rails/.rubocop.yml: Style/CaseIndentation has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/CommentIndentation has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLines has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundClassBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundMethodBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundModuleBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/IndentationConsistency has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/IndentationWidth has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAfterColon has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAfterComma has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundEqualsInParameterDefault has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundKeyword has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundOperators has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceBeforeFirstArg has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceBeforeBlockBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideBlockBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideHashLiteralBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideParens has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/Tab has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/TrailingBlankLines has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/TrailingWhitespace has the wrong namespace - should be Layout ```
2017-05-24 18:33:50 +00:00
Layout/EmptyLinesAroundModuleBody:
2016-07-20 03:35:11 +00:00
Enabled: true
2016-07-17 07:10:45 +00:00
2016-08-06 15:45:37 +00:00
# Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
Style/HashSyntax:
2016-07-20 03:35:11 +00:00
Enabled: true
2016-07-17 07:10:45 +00:00
# Method definitions after `private` or `protected` isolated calls need one
# extra level of indentation.
rubocop namespace changes from `Style` to `Layout` Refer https://github.com/bbatsov/rubocop/pull/4278/commits/54166bf76ba76b14f1bbc8a34165f175dbc3f227 for the commit ``` /path/to/rails/.rubocop.yml: Style/CaseIndentation has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/CommentIndentation has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLines has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundClassBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundMethodBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundModuleBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/IndentationConsistency has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/IndentationWidth has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAfterColon has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAfterComma has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundEqualsInParameterDefault has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundKeyword has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundOperators has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceBeforeFirstArg has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceBeforeBlockBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideBlockBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideHashLiteralBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideParens has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/Tab has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/TrailingBlankLines has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/TrailingWhitespace has the wrong namespace - should be Layout ```
2017-05-24 18:33:50 +00:00
Layout/IndentationConsistency:
2016-07-20 03:35:11 +00:00
Enabled: true
EnforcedStyle: indented_internal_methods
2016-07-17 07:10:45 +00:00
2016-08-06 15:45:37 +00:00
# Two spaces, no tabs (for indentation).
rubocop namespace changes from `Style` to `Layout` Refer https://github.com/bbatsov/rubocop/pull/4278/commits/54166bf76ba76b14f1bbc8a34165f175dbc3f227 for the commit ``` /path/to/rails/.rubocop.yml: Style/CaseIndentation has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/CommentIndentation has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLines has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundClassBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundMethodBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundModuleBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/IndentationConsistency has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/IndentationWidth has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAfterColon has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAfterComma has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundEqualsInParameterDefault has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundKeyword has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundOperators has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceBeforeFirstArg has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceBeforeBlockBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideBlockBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideHashLiteralBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideParens has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/Tab has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/TrailingBlankLines has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/TrailingWhitespace has the wrong namespace - should be Layout ```
2017-05-24 18:33:50 +00:00
Layout/IndentationWidth:
2016-07-20 03:35:11 +00:00
Enabled: true
2016-07-17 07:10:45 +00:00
Layout/LeadingCommentSpace:
Enabled: true
rubocop namespace changes from `Style` to `Layout` Refer https://github.com/bbatsov/rubocop/pull/4278/commits/54166bf76ba76b14f1bbc8a34165f175dbc3f227 for the commit ``` /path/to/rails/.rubocop.yml: Style/CaseIndentation has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/CommentIndentation has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLines has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundClassBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundMethodBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundModuleBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/IndentationConsistency has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/IndentationWidth has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAfterColon has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAfterComma has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundEqualsInParameterDefault has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundKeyword has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundOperators has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceBeforeFirstArg has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceBeforeBlockBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideBlockBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideHashLiteralBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideParens has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/Tab has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/TrailingBlankLines has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/TrailingWhitespace has the wrong namespace - should be Layout ```
2017-05-24 18:33:50 +00:00
Layout/SpaceAfterColon:
Enabled: true
rubocop namespace changes from `Style` to `Layout` Refer https://github.com/bbatsov/rubocop/pull/4278/commits/54166bf76ba76b14f1bbc8a34165f175dbc3f227 for the commit ``` /path/to/rails/.rubocop.yml: Style/CaseIndentation has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/CommentIndentation has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLines has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundClassBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundMethodBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundModuleBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/IndentationConsistency has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/IndentationWidth has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAfterColon has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAfterComma has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundEqualsInParameterDefault has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundKeyword has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundOperators has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceBeforeFirstArg has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceBeforeBlockBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideBlockBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideHashLiteralBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideParens has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/Tab has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/TrailingBlankLines has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/TrailingWhitespace has the wrong namespace - should be Layout ```
2017-05-24 18:33:50 +00:00
Layout/SpaceAfterComma:
Enabled: true
Layout/SpaceAfterSemicolon:
Enabled: true
rubocop namespace changes from `Style` to `Layout` Refer https://github.com/bbatsov/rubocop/pull/4278/commits/54166bf76ba76b14f1bbc8a34165f175dbc3f227 for the commit ``` /path/to/rails/.rubocop.yml: Style/CaseIndentation has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/CommentIndentation has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLines has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundClassBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundMethodBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundModuleBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/IndentationConsistency has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/IndentationWidth has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAfterColon has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAfterComma has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundEqualsInParameterDefault has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundKeyword has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundOperators has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceBeforeFirstArg has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceBeforeBlockBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideBlockBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideHashLiteralBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideParens has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/Tab has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/TrailingBlankLines has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/TrailingWhitespace has the wrong namespace - should be Layout ```
2017-05-24 18:33:50 +00:00
Layout/SpaceAroundEqualsInParameterDefault:
Enabled: true
rubocop namespace changes from `Style` to `Layout` Refer https://github.com/bbatsov/rubocop/pull/4278/commits/54166bf76ba76b14f1bbc8a34165f175dbc3f227 for the commit ``` /path/to/rails/.rubocop.yml: Style/CaseIndentation has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/CommentIndentation has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLines has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundClassBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundMethodBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundModuleBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/IndentationConsistency has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/IndentationWidth has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAfterColon has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAfterComma has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundEqualsInParameterDefault has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundKeyword has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundOperators has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceBeforeFirstArg has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceBeforeBlockBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideBlockBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideHashLiteralBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideParens has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/Tab has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/TrailingBlankLines has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/TrailingWhitespace has the wrong namespace - should be Layout ```
2017-05-24 18:33:50 +00:00
Layout/SpaceAroundKeyword:
Enabled: true
Layout/SpaceAroundOperators:
Enabled: true
Layout/SpaceBeforeComma:
Enabled: true
Layout/SpaceBeforeComment:
Enabled: true
rubocop namespace changes from `Style` to `Layout` Refer https://github.com/bbatsov/rubocop/pull/4278/commits/54166bf76ba76b14f1bbc8a34165f175dbc3f227 for the commit ``` /path/to/rails/.rubocop.yml: Style/CaseIndentation has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/CommentIndentation has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLines has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundClassBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundMethodBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundModuleBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/IndentationConsistency has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/IndentationWidth has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAfterColon has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAfterComma has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundEqualsInParameterDefault has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundKeyword has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundOperators has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceBeforeFirstArg has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceBeforeBlockBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideBlockBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideHashLiteralBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideParens has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/Tab has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/TrailingBlankLines has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/TrailingWhitespace has the wrong namespace - should be Layout ```
2017-05-24 18:33:50 +00:00
Layout/SpaceBeforeFirstArg:
Enabled: true
Style/DefWithParentheses:
Enabled: true
2016-08-06 15:45:37 +00:00
# Defining a method with parameters needs parentheses.
Style/MethodDefParentheses:
Enabled: true
Style/ExplicitBlockArgument:
Enabled: true
Style/FrozenStringLiteralComment:
Enabled: true
EnforcedStyle: always
Exclude:
- 'actionview/test/**/*.builder'
- 'actionview/test/**/*.ruby'
- 'actionpack/test/**/*.builder'
- 'actionpack/test/**/*.ruby'
- 'activestorage/db/migrate/**/*.rb'
- 'activestorage/db/update_migrate/**/*.rb'
2018-12-24 20:16:22 +00:00
- 'actionmailbox/db/migrate/**/*.rb'
2019-01-05 00:43:11 +00:00
- 'actiontext/db/migrate/**/*.rb'
Enable `Style/MapToHash` cop Ruby 2.6 added block argument processing to `Enumerable#to_h`. https://bugs.ruby-lang.org/issues/15143 Rails 7 requires Ruby 2.7.0 or higher, so the new feature can use it. `Style/MapToHash` cop will detect it. And this cop in the `Style` department, but this seems to improve performance as follows: ```ruby # map_to_hash.rb require 'benchmark/ips' ARRAY = (1..100).to_a HASH = {foo: 1, bar: 2} Benchmark.ips do |x| x.report('array.map.to_h') { ARRAY.map { |v| [v, v * 2] }.to_h } x.report('array.to_h') { ARRAY.to_h { |v| [v, v * 2] } } x.compare! end Benchmark.ips do |x| x.report('hash.map.to_h') { HASH.map { |k, v| [k.to_s, v * 2] }.to_h } x.report('hash.to_h') { HASH.to_h { |k, v| [k.to_s, v * 2] } } x.compare! end ``` ```console % ruby map_to_hash.rb Warming up -------------------------------------- array.map.to_h 9.063k i/100ms array.to_h 9.609k i/100ms Calculating ------------------------------------- array.map.to_h 89.063k (± 3.9%) i/s - 453.150k in 5.096572s array.to_h 96.449k (± 1.7%) i/s - 490.059k in 5.082529s Comparison: array.to_h: 96448.7 i/s array.map.to_h: 89063.4 i/s - 1.08x (± 0.00) slower Warming up -------------------------------------- hash.map.to_h 106.284k i/100ms hash.to_h 149.354k i/100ms Calculating ------------------------------------- hash.map.to_h 1.102M (± 2.2%) i/s - 5.527M in 5.019657s hash.to_h 1.490M (± 0.9%) i/s - 7.468M in 5.013264s Comparison: hash.to_h: 1489707.0 i/s hash.map.to_h: 1101561.5 i/s - 1.35x (± 0.00) slower ``` `Style/MapToHash` cop ... https://docs.rubocop.org/rubocop/1.25/cops_style.html#stylemaptohash
2022-02-25 17:45:24 +00:00
Style/MapToHash:
Enabled: true
Style/RedundantFreeze:
Enabled: true
# Use `foo {}` not `foo{}`.
rubocop namespace changes from `Style` to `Layout` Refer https://github.com/bbatsov/rubocop/pull/4278/commits/54166bf76ba76b14f1bbc8a34165f175dbc3f227 for the commit ``` /path/to/rails/.rubocop.yml: Style/CaseIndentation has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/CommentIndentation has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLines has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundClassBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundMethodBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundModuleBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/IndentationConsistency has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/IndentationWidth has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAfterColon has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAfterComma has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundEqualsInParameterDefault has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundKeyword has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundOperators has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceBeforeFirstArg has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceBeforeBlockBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideBlockBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideHashLiteralBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideParens has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/Tab has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/TrailingBlankLines has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/TrailingWhitespace has the wrong namespace - should be Layout ```
2017-05-24 18:33:50 +00:00
Layout/SpaceBeforeBlockBraces:
Enabled: true
# Use `foo { bar }` not `foo {bar}`.
rubocop namespace changes from `Style` to `Layout` Refer https://github.com/bbatsov/rubocop/pull/4278/commits/54166bf76ba76b14f1bbc8a34165f175dbc3f227 for the commit ``` /path/to/rails/.rubocop.yml: Style/CaseIndentation has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/CommentIndentation has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLines has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundClassBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundMethodBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundModuleBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/IndentationConsistency has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/IndentationWidth has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAfterColon has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAfterComma has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundEqualsInParameterDefault has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundKeyword has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundOperators has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceBeforeFirstArg has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceBeforeBlockBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideBlockBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideHashLiteralBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideParens has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/Tab has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/TrailingBlankLines has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/TrailingWhitespace has the wrong namespace - should be Layout ```
2017-05-24 18:33:50 +00:00
Layout/SpaceInsideBlockBraces:
Enabled: true
EnforcedStyleForEmptyBraces: space
# Use `{ a: 1 }` not `{a:1}`.
rubocop namespace changes from `Style` to `Layout` Refer https://github.com/bbatsov/rubocop/pull/4278/commits/54166bf76ba76b14f1bbc8a34165f175dbc3f227 for the commit ``` /path/to/rails/.rubocop.yml: Style/CaseIndentation has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/CommentIndentation has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLines has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundClassBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundMethodBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundModuleBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/IndentationConsistency has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/IndentationWidth has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAfterColon has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAfterComma has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundEqualsInParameterDefault has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundKeyword has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundOperators has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceBeforeFirstArg has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceBeforeBlockBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideBlockBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideHashLiteralBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideParens has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/Tab has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/TrailingBlankLines has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/TrailingWhitespace has the wrong namespace - should be Layout ```
2017-05-24 18:33:50 +00:00
Layout/SpaceInsideHashLiteralBraces:
Enabled: true
rubocop namespace changes from `Style` to `Layout` Refer https://github.com/bbatsov/rubocop/pull/4278/commits/54166bf76ba76b14f1bbc8a34165f175dbc3f227 for the commit ``` /path/to/rails/.rubocop.yml: Style/CaseIndentation has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/CommentIndentation has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLines has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundClassBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundMethodBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundModuleBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/IndentationConsistency has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/IndentationWidth has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAfterColon has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAfterComma has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundEqualsInParameterDefault has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundKeyword has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundOperators has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceBeforeFirstArg has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceBeforeBlockBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideBlockBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideHashLiteralBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideParens has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/Tab has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/TrailingBlankLines has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/TrailingWhitespace has the wrong namespace - should be Layout ```
2017-05-24 18:33:50 +00:00
Layout/SpaceInsideParens:
Enabled: true
2016-08-06 15:45:37 +00:00
# Check quotes usage according to lint rule below.
Style/StringLiterals:
Enabled: true
EnforcedStyle: double_quotes
# Detect hard tabs, no hard tabs.
Layout/IndentationStyle:
2016-08-06 15:45:37 +00:00
Enabled: true
# Empty lines should not have any spaces.
Layout/TrailingEmptyLines:
2016-08-06 15:45:37 +00:00
Enabled: true
# No trailing whitespace.
rubocop namespace changes from `Style` to `Layout` Refer https://github.com/bbatsov/rubocop/pull/4278/commits/54166bf76ba76b14f1bbc8a34165f175dbc3f227 for the commit ``` /path/to/rails/.rubocop.yml: Style/CaseIndentation has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/CommentIndentation has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLines has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundClassBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundMethodBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/EmptyLinesAroundModuleBody has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/IndentationConsistency has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/IndentationWidth has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAfterColon has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAfterComma has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundEqualsInParameterDefault has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundKeyword has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceAroundOperators has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceBeforeFirstArg has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceBeforeBlockBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideBlockBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideHashLiteralBraces has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/SpaceInsideParens has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/Tab has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/TrailingBlankLines has the wrong namespace - should be Layout /path/to/rails/.rubocop.yml: Style/TrailingWhitespace has the wrong namespace - should be Layout ```
2017-05-24 18:33:50 +00:00
Layout/TrailingWhitespace:
2016-08-06 15:45:37 +00:00
Enabled: true
# Use quotes for string literals when they are enough.
Style/RedundantPercentQ:
2016-07-20 03:35:11 +00:00
Enabled: true
Lint/AmbiguousOperator:
Enabled: true
Lint/AmbiguousRegexpLiteral:
Enabled: true
Lint/DuplicateRequire:
Enabled: true
Lint/DuplicateMagicComment:
Enabled: true
Lint/DuplicateMethods:
Enabled: true
Lint/ErbNewArguments:
Enabled: true
2022-02-17 22:16:42 +00:00
2022-02-05 23:51:03 +00:00
Lint/EnsureReturn:
Enabled: true
2016-08-06 15:45:37 +00:00
# Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
Lint/RequireParentheses:
Enabled: true
Lint/RedundantStringCoercion:
Enabled: true
Lint/UriEscapeUnescape:
Enabled: true
Lint/UselessAssignment:
Enabled: true
Lint/DeprecatedClassMethods:
Enabled: true
Style/ParenthesesAroundCondition:
Enabled: true
Style/HashTransformKeys:
Enabled: true
Style/HashTransformValues:
Enabled: true
Style/RedundantBegin:
Enabled: true
Style/RedundantReturn:
Enabled: true
AllowMultipleReturnValues: true
Style/RedundantRegexpEscape:
Enabled: true
Style/Semicolon:
Enabled: true
AllowAsExpressionSeparator: true
# Prefer Foo.method over Foo::method
Style/ColonMethodCall:
Enabled: true
Style/TrivialAccessors:
Enabled: true
2022-07-20 19:25:23 +00:00
# Prefer a = b || c over a = b ? b : c
Style/RedundantCondition:
Enabled: true
Performance/BindCall:
Enabled: true
Performance/FlatMap:
Enabled: true
Performance/MapCompact:
Enabled: true
Performance/SelectMap:
Enabled: true
Performance/RedundantMerge:
Enabled: true
Performance/StartWith:
Enabled: true
Performance/EndWith:
Enabled: true
Performance/RegexpMatch:
Enabled: true
Performance/ReverseEach:
Enabled: true
Performance/StringReplacement:
Enabled: true
Performance/UnfreezeString:
Enabled: true
Performance/DeletePrefix:
Enabled: true
Performance/DeleteSuffix:
Enabled: true
2022-02-17 22:16:42 +00:00
Performance/OpenStruct:
Enabled: true
Performance/InefficientHashSearch:
Enabled: true
Performance/ConstantRegexp:
Enabled: true
Performance/RedundantStringChars:
Enabled: true
Performance/StringInclude:
Enabled: true
Minitest/AssertRaisesWithRegexpArgument:
Enabled: true
Minitest/AssertWithExpectedArgument:
Enabled: true
Minitest/SkipEnsure:
Enabled: true
Minitest/UnreachableAssertion:
Enabled: true