config/default.yml in rubocop-0.93.1 vs config/default.yml in rubocop-1.0.0

- old
+ new

@@ -311,11 +311,11 @@ # But it can be overridden by setting this parameter IndentationWidth: ~ Layout/BeginEndAlignment: Description: 'Align ends corresponding to begins correctly.' - Enabled: pending + Enabled: true VersionAdded: '0.91' # The value `start_of_line` means that `end` should be aligned the start of the line # where the `begin` keyword is. # The value `begin` means that `end` should be aligned with the `begin` keyword. EnforcedStyleAlignWith: start_of_line @@ -494,11 +494,11 @@ VersionAdded: '0.52' Layout/EmptyLinesAroundAttributeAccessor: Description: "Keep blank lines around attribute accessors." StyleGuide: '#empty-lines-around-attribute-accessor' - Enabled: pending + Enabled: true VersionAdded: '0.83' VersionChanged: '0.84' AllowAliasSyntax: true AllowedMethods: - alias_method @@ -1143,11 +1143,11 @@ Enabled: true VersionAdded: '0.49' Layout/SpaceAroundMethodCallOperator: Description: 'Checks method call operators to not have spaces around them.' - Enabled: pending + Enabled: true VersionAdded: '0.82' Layout/SpaceAroundOperators: Description: 'Use a single space around operators.' StyleGuide: '#spaces-operators' @@ -1333,11 +1333,11 @@ Description: 'Avoid trailing whitespace.' StyleGuide: '#no-trailing-whitespace' Enabled: true VersionAdded: '0.49' VersionChanged: '0.83' - AllowInHeredoc: true + AllowInHeredoc: false #################### Lint ################################## ### Warnings Lint/AmbiguousBlockAssociation: @@ -1377,11 +1377,11 @@ Enabled: true VersionAdded: '0.53' Lint/BinaryOperatorWithIdenticalOperands: Description: 'This cop checks for places where binary operator has identical operands.' - Enabled: pending + Enabled: true Safe: false VersionAdded: '0.89' Lint/BooleanSymbol: Description: 'Check for `:true` and `:false` symbols.' @@ -1396,11 +1396,11 @@ VersionAdded: '0.33' Lint/ConstantDefinitionInBlock: Description: 'Do not define constants within a block.' StyleGuide: '#no-constant-definition-in-block' - Enabled: pending + Enabled: true VersionAdded: '0.91' Lint/ConstantResolution: Description: 'Check that constants are fully qualified with `::`.' Enabled: false @@ -1421,11 +1421,11 @@ Enabled: true VersionAdded: '0.19' Lint/DeprecatedOpenSSLConstant: Description: "Don't use algorithm constants for `OpenSSL::Cipher` and `OpenSSL::Digest`." - Enabled: pending + Enabled: true VersionAdded: '0.84' Lint/DisjunctiveAssignmentInConstructor: Description: 'In constructor, plain assignment is preferred over disjunctive.' Enabled: true @@ -1438,11 +1438,11 @@ Enabled: true VersionAdded: '0.45' Lint/DuplicateElsifCondition: Description: 'Do not repeat conditions used in if `elsif`.' - Enabled: 'pending' + Enabled: true VersionAdded: '0.88' Lint/DuplicateHashKey: Description: 'Check for duplicate keys in hash literals.' Enabled: true @@ -1454,16 +1454,16 @@ Enabled: true VersionAdded: '0.29' Lint/DuplicateRequire: Description: 'Check for duplicate `require`s and `require_relative`s.' - Enabled: pending + Enabled: true VersionAdded: '0.90' Lint/DuplicateRescueException: Description: 'Checks that there are no repeated exceptions used in `rescue` expressions.' - Enabled: pending + Enabled: true VersionAdded: '0.89' Lint/EachWithObjectArgument: Description: 'Check for immutable argument given to each_with_object.' Enabled: true @@ -1474,11 +1474,11 @@ Enabled: true VersionAdded: '0.17' Lint/EmptyConditionalBody: Description: 'This cop checks for the presence of `if`, `elsif` and `unless` branches without a body.' - Enabled: 'pending' + Enabled: true AllowComments: true VersionAdded: '0.89' Lint/EmptyEnsure: Description: 'Checks for empty ensure block.' @@ -1491,11 +1491,11 @@ Enabled: true VersionAdded: '0.45' Lint/EmptyFile: Description: 'Enforces that Ruby source files are not empty.' - Enabled: pending + Enabled: true AllowComments: true VersionAdded: '0.90' Lint/EmptyInterpolation: Description: 'Checks for empty string interpolation.' @@ -1529,11 +1529,11 @@ VersionAdded: '0.16' Lint/FloatComparison: Description: 'Checks for the presence of precise comparison of floating point numbers.' StyleGuide: '#float-comparison' - Enabled: pending + Enabled: true VersionAdded: '0.89' Lint/FloatOutOfRange: Description: >- Catches floating-point literals too large or small for Ruby to @@ -1547,11 +1547,11 @@ VersionAdded: '0.33' Lint/HashCompareByIdentity: Description: 'Prefer using `Hash#compare_by_identity` than using `object_id` for keys.' StyleGuide: '#identity-comparison' - Enabled: pending + Enabled: true Safe: false VersionAdded: '0.93' Lint/HeredocMethodCallPosition: Description: >- @@ -1561,11 +1561,11 @@ StyleGuide: '#heredoc-method-calls' VersionAdded: '0.68' Lint/IdentityComparison: Description: 'Prefer `equal?` over `==` when comparing `object_id`.' - Enabled: pending + Enabled: true StyleGuide: '#identity-comparison' VersionAdded: '0.91' Lint/ImplicitStringConcatenation: Description: >- @@ -1633,16 +1633,16 @@ Lint/MissingSuper: Description: >- This cop checks for the presence of constructors and lifecycle callbacks without calls to `super`'. - Enabled: pending + Enabled: true VersionAdded: '0.89' Lint/MixedRegexpCaptureTypes: Description: 'Do not mix named captures and numbered captures in a Regexp literal.' - Enabled: pending + Enabled: true VersionAdded: '0.85' Lint/MultipleComparison: Description: "Use `&&` operator to compare multiple values." Enabled: true @@ -1690,11 +1690,11 @@ Enabled: true VersionAdded: '0.53' Lint/OutOfRangeRegexpRef: Description: 'Checks for out of range reference for Regexp because it always returns nil.' - Enabled: pending + Enabled: true Safe: false VersionAdded: '0.89' Lint/ParenthesesAsGroupedExpression: Description: >- @@ -1719,11 +1719,11 @@ VersionAdded: '0.41' Lint/RaiseException: Description: Checks for `raise` or `fail` statements which are raising `Exception` class. StyleGuide: '#raise-exception' - Enabled: pending + Enabled: true Safe: false VersionAdded: '0.81' VersionChanged: '0.86' AllowedImplicitNamespaces: - 'Gem' @@ -1753,11 +1753,11 @@ Enabled: true VersionAdded: '0.76' Lint/RedundantSafeNavigation: Description: 'Checks for redundant safe navigation calls.' - Enabled: pending + Enabled: true VersionAdded: '0.93' AllowedMethods: - instance_of? - kind_of? - is_a? @@ -1860,11 +1860,11 @@ VersionAdded: '0.49' VersionChanged: '0.50' Lint/SelfAssignment: Description: 'Checks for self-assignments.' - Enabled: pending + Enabled: true VersionAdded: '0.89' Lint/SendWithMixinArgument: Description: 'Checks for `send` method when using mixin.' Enabled: true @@ -1891,11 +1891,11 @@ Enabled: true VersionAdded: '0.9' Lint/StructNewOverride: Description: 'Disallow overriding the `Struct` built-in methods via `Struct.new`.' - Enabled: pending + Enabled: true VersionAdded: '0.81' Lint/SuppressedException: Description: "Don't suppress exceptions." StyleGuide: '#dont-hide-exceptions' @@ -1915,16 +1915,16 @@ Enabled: true VersionAdded: '0.66' Lint/TopLevelReturnWithArgument: Description: 'This cop detects top level return statements with argument.' - Enabled: 'pending' + Enabled: true VersionAdded: '0.89' Lint/TrailingCommaInAttributeDeclaration: Description: 'This cop checks for trailing commas in attribute declarations.' - Enabled: pending + Enabled: true VersionAdded: '0.90' Lint/UnderscorePrefixedVariableName: Description: 'Do not use prefix `_` for a variable that is used.' Enabled: true @@ -1941,11 +1941,11 @@ Enabled: true VersionAdded: '0.9' Lint/UnreachableLoop: Description: 'This cop checks for loops that will have at most one iteration.' - Enabled: pending + Enabled: true VersionAdded: '0.89' Lint/UnusedBlockArgument: Description: 'Checks for unused block arguments.' StyleGuide: '#underscore-unused-vars' @@ -2000,11 +2000,11 @@ Enabled: true VersionAdded: '0.17' Lint/UselessMethodDefinition: Description: 'Checks for useless method definitions.' - Enabled: pending + Enabled: true VersionAdded: '0.90' Safe: false AllowComments: true Lint/UselessSetterCall: @@ -2014,11 +2014,11 @@ VersionChanged: '0.80' Safe: false Lint/UselessTimes: Description: 'Checks for useless `Integer#times` calls.' - Enabled: pending + Enabled: true VersionAdded: '0.91' Safe: false Lint/Void: Description: 'Possible use of operator/literal/variable in void context.' @@ -2413,13 +2413,14 @@ Reference: 'https://ruby-doc.org/core-2.7.0/Marshal.html#module-Marshal-label-Security+considerations' Enabled: true VersionAdded: '0.47' Security/Open: - Description: 'The use of Kernel#open represents a serious security risk.' + Description: 'The use of `Kernel#open` and `URI.open` represent a serious security risk.' Enabled: true VersionAdded: '0.53' + VersionChanged: '1.0' Safe: false Security/YAMLLoad: Description: >- Prefer usage of `YAML.safe_load` over `YAML.load` due to potential @@ -2442,11 +2443,11 @@ - group AllowModifiersOnSymbols: true Style/AccessorGrouping: Description: 'Checks for grouping of accessors in `class` and `module` bodies.' - Enabled: 'pending' + Enabled: true VersionAdded: '0.87' EnforcedStyle: grouped SupportedStyles: # separated: each accessor goes in a separate statement. # grouped: accessors are grouped into a single statement. @@ -2531,11 +2532,11 @@ Style/BisectedAttrAccessor: Description: >- Checks for places where `attr_reader` and `attr_writer` for the same method can be combined into single `attr_accessor`. - Enabled: 'pending' + Enabled: true VersionAdded: '0.87' Style/BlockComments: Description: 'Do not use block comments.' StyleGuide: '#no-block-comments' @@ -2670,11 +2671,11 @@ AllowOnConstant: false Style/CaseLikeIf: Description: 'This cop identifies places where `if-elsif` constructions can be replaced with `case-when`.' StyleGuide: '#case-vs-if-else' - Enabled: 'pending' + Enabled: true Safe: false VersionAdded: '0.88' Style/CharacterLiteral: Description: 'Checks for uses of character literals.' @@ -2723,11 +2724,11 @@ - kind_of? Style/ClassEqualityComparison: Description: 'Enforces the use of `Object#instance_of?` instead of class comparison for equality.' StyleGuide: '#instance-of-vs-class-comparison' - Enabled: pending + Enabled: true VersionAdded: '0.93' IgnoredMethods: - == - equal? - eql? @@ -2791,11 +2792,11 @@ Style/CombinableLoops: Description: >- Checks for places where multiple consecutive loops over the same data can be combined into a single loop. - Enabled: pending + Enabled: true Safe: false VersionAdded: '0.90' Style/CommandLiteral: Description: 'Use `` or %x around command literals.' @@ -3044,19 +3045,19 @@ Style/ExplicitBlockArgument: Description: >- Consider using explicit block argument to avoid writing block literal that just passes its arguments to another block. StyleGuide: '#block-argument' - Enabled: pending + Enabled: true # May change the yielding arity. Safe: false VersionAdded: '0.89' Style/ExponentialNotation: Description: 'When using exponential notation, favor a mantissa between 1 (inclusive) and 10 (exclusive).' StyleGuide: '#exponential-notation' - Enabled: pending + Enabled: true VersionAdded: '0.82' EnforcedStyle: scientific SupportedStyles: - scientific - engineering @@ -3107,12 +3108,16 @@ # `%<name>s`, `%<age>d`, `%<score>f` - annotated # Prefer simple looking "template" style tokens like `%{name}`, `%{age}` - template - unannotated + # `MaxUnannotatedPlaceholdersAllowed` defines the number of `unannotated` + # style token in a format string to be allowed when enforced style is not + # `unannotated`. + MaxUnannotatedPlaceholdersAllowed: 1 VersionAdded: '0.49' - VersionChanged: '0.75' + VersionChanged: '1.0' Style/FrozenStringLiteralComment: Description: >- Add the frozen_string_literal comment to the top of files to help transition to frozen string literals by default. @@ -3135,11 +3140,11 @@ SafeAutoCorrect: false Style/GlobalStdStream: Description: 'Enforces the use of `$stdout/$stderr/$stdin` instead of `STDOUT/STDERR/STDIN`.' StyleGuide: '#global-stdout' - Enabled: pending + Enabled: true VersionAdded: '0.89' SafeAutoCorrect: false Style/GlobalVars: Description: 'Do not introduce global variables.' @@ -3163,29 +3168,29 @@ Style/HashAsLastArrayItem: Description: >- Checks for presence or absence of braces around hash literal as a last array item depending on configuration. StyleGuide: '#hash-literal-as-last-array-item' - Enabled: 'pending' + Enabled: true VersionAdded: '0.88' EnforcedStyle: braces SupportedStyles: - braces - no_braces Style/HashEachMethods: Description: 'Use Hash#each_key and Hash#each_value.' StyleGuide: '#hash-each' - Enabled: pending + Enabled: true VersionAdded: '0.80' Safe: false Style/HashLikeCase: Description: >- Checks for places where `case-when` represents a simple 1:1 mapping and can be replaced with a hash lookup. - Enabled: 'pending' + Enabled: true VersionAdded: '0.88' # `MinBranchesCount` defines the number of branches `case` needs to have # to trigger this cop MinBranchesCount: 3 @@ -3212,18 +3217,18 @@ # Do not suggest { a?: 1 } over { :a? => 1 } in ruby19 style PreferHashRocketsForNonAlnumEndingSymbols: false Style/HashTransformKeys: Description: 'Prefer `transform_keys` over `each_with_object`, `map`, or `to_h`.' - Enabled: 'pending' + Enabled: true VersionAdded: '0.80' VersionChanged: '0.90' Safe: false Style/HashTransformValues: Description: 'Prefer `transform_values` over `each_with_object`, `map`, or `to_h`.' - Enabled: 'pending' + Enabled: true VersionAdded: '0.80' VersionChanged: '0.90' Safe: false Style/IdenticalConditionalBranches: @@ -3326,11 +3331,11 @@ - '**/*.gemspec' Style/KeywordParametersOrder: Description: 'Enforces that optional keyword parameters are placed at the end of the parameters list.' StyleGuide: '#keyword-parameters-order' - Enabled: pending + Enabled: true VersionAdded: '0.90' Style/Lambda: Description: 'Use the new lambda literal syntax for single-line blocks.' StyleGuide: '#lambda-multi-line' @@ -3751,11 +3756,11 @@ VersionChanged: '0.83' Style/OptionalBooleanParameter: Description: 'Use keyword arguments when defining method with boolean argument.' StyleGuide: '#boolean-keyword-arguments' - Enabled: pending + Enabled: true Safe: false VersionAdded: '0.89' AllowedMethods: - respond_to_missing? @@ -3855,11 +3860,11 @@ Enabled: true VersionAdded: '0.52' Style/RedundantAssignment: Description: 'Checks for redundant assignment before returning.' - Enabled: 'pending' + Enabled: true VersionAdded: '0.87' Style/RedundantBegin: Description: "Don't use begin blocks when they are not needed." StyleGuide: '#begin-implicit' @@ -3892,11 +3897,11 @@ Style/RedundantFetchBlock: Description: >- Use `fetch(key, value)` instead of `fetch(key) { value }` when value has Numeric, Rational, Complex, Symbol or String type, `false`, `true`, `nil` or is a constant. Reference: 'https://github.com/JuanitoFatas/fast-ruby#hashfetch-with-argument-vs-hashfetch--block-code' - Enabled: 'pending' + Enabled: true Safe: false # If enabled, this cop will autocorrect usages of # `fetch` being called with block returning a constant. # This can be dangerous since constants will not be defined at that moment. SafeForConstants: false @@ -3905,11 +3910,11 @@ Style/RedundantFileExtensionInRequire: Description: >- Checks for the presence of superfluous `.rb` extension in the filename provided to `require` and `require_relative`. StyleGuide: '#no-explicit-rb-to-require' - Enabled: 'pending' + Enabled: true VersionAdded: '0.88' Style/RedundantFreeze: Description: "Checks usages of Object#freeze on immutable objects." Enabled: true @@ -3932,16 +3937,16 @@ Enabled: true VersionAdded: '0.76' Style/RedundantRegexpCharacterClass: Description: 'Checks for unnecessary single-element Regexp character classes.' - Enabled: pending + Enabled: true VersionAdded: '0.85' Style/RedundantRegexpEscape: Description: 'Checks for redundant escapes in Regexps.' - Enabled: pending + Enabled: true VersionAdded: '0.85' Style/RedundantReturn: Description: "Don't use return where it's not required." StyleGuide: '#no-explicit-return' @@ -3958,11 +3963,11 @@ VersionAdded: '0.10' VersionChanged: '0.13' Style/RedundantSelfAssignment: Description: 'Checks for places where redundant assignments are made for in place modification methods.' - Enabled: pending + Enabled: true Safe: false VersionAdded: '0.90' Style/RedundantSort: Description: >- @@ -4086,11 +4091,11 @@ - only_fail - semantic Style/SingleArgumentDig: Description: 'Avoid using single argument dig method.' - Enabled: pending + Enabled: true VersionAdded: '0.89' Safe: false Style/SingleLineBlockParams: Description: 'Enforces the names of some block params.' @@ -4113,19 +4118,19 @@ VersionChanged: '0.19' AllowIfMethodIsEmpty: true Style/SlicingWithRange: Description: 'Checks array slicing is done with endless ranges when suitable.' - Enabled: pending + Enabled: true VersionAdded: '0.83' Safe: false Style/SoleNestedConditional: Description: >- Finds sole nested conditional nodes which can be merged into outer conditional node. - Enabled: pending + Enabled: true VersionAdded: '0.89' AllowModifier: false Style/SpecialGlobalVars: Description: 'Avoid Perl-style global variables.' @@ -4156,10 +4161,10 @@ VersionAdded: '0.51' Style/StringConcatenation: Description: 'Checks for places where string concatenation can be replaced with string interpolation.' StyleGuide: '#string-interpolation' - Enabled: pending + Enabled: true Safe: false VersionAdded: '0.89' Style/StringHashKeys: Description: 'Prefer symbols instead of strings as hash keys.'