-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
295 additions
and
307 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,333 @@ | ||
inherit_from: | ||
- .rubocop_todo.yml | ||
- .rubocop_rspec_base.yml | ||
|
||
AllCops: | ||
Exclude: | ||
# Templates are really ERB which Rubocop does not parse | ||
- 'lib/generators/rspec/*/templates/**/*' | ||
|
||
Layout/AccessModifierIndentation: | ||
Enabled: false | ||
|
||
Layout/AssignmentIndentation: | ||
Enabled: false | ||
|
||
Layout/ClosingParenthesisIndentation: | ||
Enabled: false | ||
|
||
Layout/EmptyLineAfterMagicComment: | ||
Enabled: false | ||
|
||
Layout/EmptyLineBetweenDefs: | ||
Enabled: false | ||
|
||
Layout/EmptyLinesAroundAccessModifier: | ||
Enabled: false | ||
|
||
Layout/EmptyLinesAroundBlockBody: | ||
Enabled: false | ||
|
||
Layout/ExtraSpacing: | ||
Enabled: false | ||
|
||
Layout/FirstArgumentIndentation: | ||
Enabled: false | ||
|
||
Layout/FirstArrayElementIndentation: | ||
Enabled: false | ||
|
||
Layout/HashAlignment: | ||
Enabled: false | ||
|
||
Layout/HeredocIndentation: | ||
Enabled: false | ||
|
||
Layout/MultilineMethodCallBraceLayout: | ||
Enabled: false | ||
|
||
Layout/MultilineMethodCallIndentation: | ||
Enabled: false | ||
|
||
Layout/MultilineOperationIndentation: | ||
Enabled: false | ||
|
||
Layout/ParameterAlignment: | ||
EnforcedStyle: with_first_parameter | ||
|
||
Layout/SpaceInsidePercentLiteralDelimiters: | ||
Enabled: false | ||
|
||
# We use spaces, so it's less of a change to stick with that. | ||
Layout/SpaceAroundEqualsInParameterDefault: | ||
EnforcedStyle: space | ||
|
||
################################################################################ | ||
# Individual File Exclusions | ||
################################################################################ | ||
Layout/SpaceAroundBlockParameters: | ||
Enabled: false | ||
|
||
Layout/SpaceAroundOperators: | ||
Enabled: false | ||
|
||
AllCops: | ||
Layout/SpaceBeforeComma: | ||
Enabled: false | ||
|
||
Layout/SpaceInsideStringInterpolation: | ||
Enabled: false | ||
|
||
Lint/AssignmentInCondition: | ||
Enabled: false | ||
|
||
Lint/EmptyExpression: | ||
Enabled: false | ||
|
||
Lint/ImplicitStringConcatenation: | ||
Enabled: false | ||
|
||
Lint/NestedMethodDefinition: | ||
Enabled: false | ||
|
||
# Exceptions should be rescued with `Support::AllExceptionsExceptOnesWeMustNotRescue` | ||
Lint/RescueException: | ||
Enabled: true | ||
|
||
Lint/SuppressedException: | ||
Exclude: | ||
# Templates are really ERB which Rubocop does not parse | ||
- 'lib/generators/rspec/*/templates/**/*' | ||
# RSpec is tightly coupled to capybara right now, this should be | ||
# re-evaluted in the future. For now we allow the empty rescue | ||
- lib/rspec/rails/vendor/capybara.rb | ||
|
||
Metrics/AbcSize: | ||
Enabled: false | ||
|
||
Metrics/BlockLength: | ||
Enabled: false | ||
|
||
# Warns when the class is excessively long. | ||
Metrics/ClassLength: | ||
Max: 100 | ||
|
||
Metrics/PerceivedComplexity: | ||
Enabled: false | ||
|
||
# Who cares what we call the argument for binary operator methods? | ||
Naming/BinaryOperatorParameterName: | ||
Enabled: false | ||
|
||
Naming/ConstantName: | ||
Enabled: false | ||
|
||
Naming/FileName: | ||
Exclude: | ||
# We break convention here so that when bundler requires the gem, which | ||
# uses the gem name, things work without user configuration. | ||
- lib/rspec-rails.rb | ||
|
||
Lint/SuppressedException: | ||
Exclude: | ||
# RSpec is tightly coupled to capybara right now, this should be | ||
# re-evaluted in the future. For now we allow the empty rescue | ||
- lib/rspec/rails/vendor/capybara.rb | ||
Naming/HeredocDelimiterNaming: | ||
Enabled: false | ||
|
||
Naming/MemoizedInstanceVariableName: | ||
Enabled: false | ||
|
||
Naming/MethodParameterName: | ||
Enabled: false | ||
|
||
# We have too many special cases where we allow generator methods or prefer a | ||
# prefixed predicate due to it's improved readability. | ||
Naming/PredicateName: | ||
Enabled: false | ||
|
||
Naming/RescuedExceptionsVariableName: | ||
Enabled: false | ||
|
||
Naming/VariableNumber: | ||
Enabled: false | ||
|
||
Style/CollectionMethods: | ||
PreferredMethods: | ||
reduce: 'inject' | ||
|
||
Style/AccessModifierDeclarations: | ||
Enabled: false | ||
|
||
# "Use alias_method instead of alias" | ||
# We're fine with `alias`. | ||
Style/Alias: | ||
Enabled: false | ||
|
||
Style/BlockDelimiters: | ||
Enabled: false | ||
|
||
# "Avoid the use of the case equality operator ===" | ||
# We prefer using `Class#===` over `Object#is_a?` because `Class#===` | ||
# is less likely to be monkey patched than `is_a?` on a user object. | ||
Style/CaseEquality: | ||
Enabled: false | ||
|
||
Style/ClassCheck: | ||
Enabled: false | ||
|
||
Style/ConditionalAssignment: | ||
Enabled: false | ||
|
||
Style/DateTime: | ||
Enabled: false | ||
|
||
# We use YARD to enforce documentation. It works better than rubocop's | ||
# enforcement...rubocop complains about the places we re-open | ||
# `RSpec::Expectations` and `RSpec::Matchers` w/o having doc commments. | ||
Style/Documentation: | ||
Enabled: false | ||
|
||
Style/DoubleNegation: | ||
Enabled: false | ||
|
||
Style/EmptyMethod: | ||
Enabled: false | ||
|
||
Style/EmptyCaseCondition: | ||
Enabled: false | ||
|
||
Style/EmptyElse: | ||
Enabled: false | ||
|
||
Style/FormatString: | ||
EnforcedStyle: percent | ||
|
||
Style/FormatStringToken: | ||
Enabled: false | ||
|
||
Style/FrozenStringLiteralComment: | ||
Enabled: false | ||
|
||
Style/GuardClause: | ||
Enabled: false | ||
|
||
Style/IdenticalConditionalBranches: | ||
Enabled: false | ||
|
||
Style/IfUnlessModifierOfIfUnless: | ||
Enabled: false | ||
|
||
Style/IfInsideElse: | ||
Enabled: false | ||
|
||
Style/IfUnlessModifier: | ||
Exclude: | ||
# Allow single line statement as the style matches the remainder of the file | ||
- lib/rspec/rails/vendor/capybara.rb | ||
Enabled: false | ||
|
||
Style/MethodMissingSuper: | ||
Enabled: false | ||
|
||
Style/MissingRespondToMissing: | ||
Enabled: false | ||
|
||
Style/MixinUsage: | ||
Enabled: false | ||
|
||
Style/MultilineIfModifier: | ||
Enabled: false | ||
|
||
Style/MultipleComparison: | ||
Enabled: false | ||
|
||
Style/MutableConstant: | ||
Enabled: false | ||
|
||
Style/NestedModifier: | ||
Enabled: false | ||
|
||
Style/NestedParenthesizedCalls: | ||
Enabled: false | ||
|
||
Style/NumericPredicate: | ||
Enabled: false | ||
|
||
Style/ParallelAssignment: | ||
Enabled: false | ||
|
||
Style/ParenthesesAroundCondition: | ||
Enabled: false | ||
|
||
Style/PerlBackrefs: | ||
Exclude: | ||
# We probably can refactor the backref out, but for now excluding it since | ||
# we can't use named matches in 1.8.7 | ||
- lib/generators/rspec/scaffold/scaffold_generator.rb | ||
|
||
Style/AccessModifierDeclarations: | ||
Style/PercentLiteralDelimiters: | ||
PreferredDelimiters: | ||
'%': () # double-quoted string | ||
'%i': '[]' # array of symbols | ||
'%q': () # single-quoted string | ||
'%Q': () # double-quoted string | ||
'%r': '{}' # regular expression pattern | ||
'%s': () # a symbol | ||
'%w': '[]' # array of single-quoted strings | ||
'%W': '[]' # array of double-quoted strings | ||
'%x': () # a shell command as a string | ||
|
||
Style/Proc: | ||
Enabled: false | ||
|
||
Naming/MemoizedInstanceVariableName: | ||
Style/RegexpLiteral: | ||
Enabled: false | ||
|
||
Naming/MethodParameterName: | ||
Style/RedundantReturn: | ||
Enabled: false | ||
|
||
Metrics/PerceivedComplexity: | ||
Style/RedundantParentheses: | ||
Enabled: false | ||
|
||
Metrics/BlockLength: | ||
Style/RescueStandardError: | ||
Enabled: false | ||
|
||
Lint/AssignmentInCondition: | ||
# We haven't adopted the `fail` to signal exceptions vs `raise` for re-raises convention. | ||
Style/SignalException: | ||
Enabled: false | ||
|
||
Lint/EmptyExpression: | ||
# This rule favors constant names from the English standard library which we don't load. | ||
Style/SpecialGlobalVars: | ||
Enabled: false | ||
|
||
Layout/HashAlignment: | ||
Style/StderrPuts: | ||
Enabled: false | ||
|
||
Naming/RescuedExceptionsVariableName: | ||
Style/StringLiteralsInInterpolation: | ||
Enabled: false | ||
|
||
Style/StructInheritance: | ||
Enabled: false | ||
|
||
# We don't care about single vs double qoutes. | ||
Style/StringLiterals: | ||
Enabled: false | ||
|
||
Style/SymbolArray: | ||
Enabled: false | ||
|
||
Style/SymbolProc: | ||
Enabled: false | ||
|
||
Style/TernaryParentheses: | ||
Enabled: false | ||
|
||
Style/TrailingCommaInArrayLiteral: | ||
Enabled: false | ||
|
||
Style/TrailingCommaInHashLiteral: | ||
Enabled: false | ||
|
||
Style/TrailingCommaInArguments: | ||
Enabled: false | ||
|
||
Style/TrivialAccessors: | ||
AllowDSLWriters: true | ||
AllowPredicates: true | ||
ExactNameMatch: true | ||
|
||
Style/TrailingUnderscoreVariable: | ||
Enabled: false | ||
|
||
Style/YodaCondition: | ||
Enabled: false | ||
|
||
Style/ZeroLengthPredicate: | ||
Enabled: false |
Oops, something went wrong.