config/default.yml in rubocop-1.32.0 vs config/default.yml in rubocop-1.33.0

- old
+ new

@@ -1500,11 +1500,13 @@ parentheses. StyleGuide: '#syntax' Enabled: true VersionAdded: '0.48' VersionChanged: '1.13' - IgnoredMethods: [] + AllowedMethods: [] + AllowedPatterns: [] + IgnoredMethods: [] # deprecated Lint/AmbiguousOperator: Description: >- Checks for ambiguous operators in the first argument of a method invocation without parentheses. @@ -1751,10 +1753,11 @@ Lint/EmptyConditionalBody: Description: 'Checks for the presence of `if`, `elsif` and `unless` branches without a body.' Enabled: true AllowComments: true VersionAdded: '0.89' + VersionChanged: '1.33' Lint/EmptyEnsure: Description: 'Checks for empty ensure block.' Enabled: true VersionAdded: '0.10' @@ -1968,10 +1971,11 @@ Enabled: pending VersionAdded: '1.2' Lint/NonAtomicFileOperation: Description: Checks for non-atomic file operations. + StyleGuide: '#atomic-file-operations' Enabled: pending VersionAdded: '1.31' SafeAutoCorrect: false Lint/NonDeterministicRequireOrder: @@ -1989,11 +1993,13 @@ Description: 'Checks unsafe usage of number conversion methods.' Enabled: false VersionAdded: '0.53' VersionChanged: '1.1' SafeAutoCorrect: false - IgnoredMethods: [] + AllowedMethods: [] + AllowedPatterns: [] + IgnoredMethods: [] # deprecated IgnoredClasses: - Time - DateTime Lint/NumberedParameterAssignment: @@ -2441,11 +2447,13 @@ Enabled: true VersionAdded: '0.27' VersionChanged: '1.5' # The ABC size is a calculated magnitude, so this number can be an Integer or # a Float. - IgnoredMethods: [] + AllowedMethods: [] + AllowedPatterns: [] + IgnoredMethods: [] # deprecated CountRepeatedAttributes: true Max: 17 Metrics/BlockLength: Description: 'Avoid long blocks with many lines.' @@ -2454,14 +2462,16 @@ VersionChanged: '1.5' CountComments: false # count full line comments? Max: 25 CountAsOne: [] ExcludedMethods: [] # deprecated, retained for backwards compatibility - IgnoredMethods: + AllowedMethods: # By default, exclude the `#refine` method, as it tends to have larger # associated blocks. - refine + AllowedPatterns: [] + IgnoredMethods: [] # deprecated Exclude: - '**/*.gemspec' Metrics/BlockNesting: Description: 'Avoid excessive block nesting.' @@ -2487,11 +2497,13 @@ A complexity metric that is strongly correlated to the number of test cases needed to validate a method. Enabled: true VersionAdded: '0.25' VersionChanged: '0.81' - IgnoredMethods: [] + AllowedMethods: [] + AllowedPatterns: [] + IgnoredMethods: [] # deprecated Max: 7 Metrics/MethodLength: Description: 'Avoid methods longer than 10 lines of code.' StyleGuide: '#short-methods' @@ -2500,11 +2512,13 @@ VersionChanged: '1.5' CountComments: false # count full line comments? Max: 10 CountAsOne: [] ExcludedMethods: [] # deprecated, retained for backwards compatibility - IgnoredMethods: [] + AllowedMethods: [] + AllowedPatterns: [] + IgnoredMethods: [] # deprecated Metrics/ModuleLength: Description: 'Avoid modules longer than 100 lines of code.' Enabled: true VersionAdded: '0.31' @@ -2528,11 +2542,13 @@ A complexity metric geared towards measuring complexity for a human reader. Enabled: true VersionAdded: '0.25' VersionChanged: '0.81' - IgnoredMethods: [] + AllowedMethods: [] + AllowedPatterns: [] + IgnoredMethods: [] # deprecated Max: 8 ################## Migration ############################# Migration/DepartmentName: @@ -3059,11 +3075,11 @@ # unless AllowBracesOnProceduralOneLiners has a truthy value (see below). # # This looks at the usage of a block's method to determine its type (e.g. is # the result of a `map` assigned to a variable or passed to another # method) but exceptions are permitted in the `ProceduralMethods`, - # `FunctionalMethods` and `IgnoredMethods` sections below. + # `FunctionalMethods` and `AllowedMethods` sections below. - semantic # The `braces_for_chaining` style enforces braces around single line blocks # and do..end around multi-line blocks, except for multi-line blocks whose # return value is being chained with another method (in which case braces # are enforced). @@ -3100,11 +3116,11 @@ # doesn't appear to be used from the return value of `let`. - let - let! - subject - watch - IgnoredMethods: + AllowedMethods: # Methods that can be either procedural or functional and cannot be # categorised from their usage alone, e.g. # # foo = lambda do |x| # puts "Hello, #{x}" @@ -3117,10 +3133,12 @@ # Here, it is impossible to tell from the return value of `lambda` whether # the inner block's return value is significant. - lambda - proc - it + AllowedPatterns: [] + IgnoredMethods: [] # deprecated # The AllowBracesOnProceduralOneLiners option is ignored unless the # EnforcedStyle is set to `semantic`. If so: # # If AllowBracesOnProceduralOneLiners is unspecified, or set to any # falsey value, then semantic purity is maintained, so one-line @@ -3220,14 +3238,16 @@ Style/ClassEqualityComparison: Description: 'Enforces the use of `Object#instance_of?` instead of class comparison for equality.' StyleGuide: '#instance-of-vs-class-comparison' Enabled: true VersionAdded: '0.93' - IgnoredMethods: + AllowedMethods: - == - equal? - eql? + AllowedPatterns: [] + IgnoredMethods: [] # deprecated Style/ClassMethods: Description: 'Use self when defining module/class methods.' StyleGuide: '#def-self-class-methods' Enabled: true @@ -3685,11 +3705,13 @@ # style token in a format string to be allowed when enforced style is not # `unannotated`. MaxUnannotatedPlaceholdersAllowed: 1 VersionAdded: '0.49' VersionChanged: '1.0' - IgnoredMethods: [] + AllowedMethods: [] + AllowedPatterns: [] + IgnoredMethods: [] # deprecated Style/FrozenStringLiteralComment: Description: >- Add the frozen_string_literal comment to the top of files to help transition to frozen string literals by default. @@ -4004,11 +4026,12 @@ StyleGuide: '#method-invocation-parens' Enabled: false VersionAdded: '0.47' VersionChanged: '1.7' IgnoreMacros: true - IgnoredMethods: [] + AllowedMethods: [] + IgnoredMethods: [] # deprecated AllowedPatterns: [] IgnoredPatterns: [] # deprecated IncludedMacros: [] AllowParenthesesInMultilineCall: false AllowParenthesesInChaining: false @@ -4021,11 +4044,13 @@ Style/MethodCallWithoutArgsParentheses: Description: 'Do not use parentheses for method calls with no arguments.' StyleGuide: '#method-invocation-parens' Enabled: true - IgnoredMethods: [] + AllowedMethods: [] + AllowedPatterns: [] + IgnoredMethods: [] # deprecated VersionAdded: '0.47' VersionChanged: '0.55' Style/MethodCalledOnDoEndBlock: Description: 'Avoid chaining a method call on a do...end block.' @@ -4391,11 +4416,13 @@ VersionChanged: '0.59' EnforcedStyle: predicate SupportedStyles: - predicate - comparison - IgnoredMethods: [] + AllowedMethods: [] + AllowedPatterns: [] + IgnoredMethods: [] # deprecated # Exclude RSpec specs because assertions like `expect(1).to be > 0` cause # false positives. Exclude: - 'spec/**/*' @@ -5028,14 +5055,16 @@ Enabled: true Safe: false VersionAdded: '0.26' VersionChanged: '1.28' AllowMethodsWithArguments: false - # A list of method names to be ignored by the check. + # A list of method names to be always allowed by the check. # The names should be fairly unique, otherwise you'll end up ignoring lots of code. - IgnoredMethods: + AllowedMethods: - respond_to - define_method + AllowedPatterns: [] + IgnoredMethods: [] # deprecated AllowComments: false Style/TernaryParentheses: Description: 'Checks for use of parentheses around ternary conditions.' Enabled: true