config/upstream.yml in cookstyle-7.0.0 vs config/upstream.yml in cookstyle-7.1.2

- old
+ new

@@ -1476,10 +1476,11 @@ Lint/ElseLayout: Description: 'Check for odd code arrangement in an else block.' Enabled: true VersionAdded: '0.17' + VersionChanged: '1.2' Lint/EmptyBlock: Description: 'This cop checks for blocks without a body.' Enabled: pending VersionAdded: '1.1' @@ -1677,10 +1678,15 @@ Do not omit the accumulator when calling `next` in a `reduce`/`inject` block. Enabled: true VersionAdded: '0.36' +Lint/NoReturnInBeginEndBlocks: + Description: 'Do not `return` inside `begin..end` blocks in assignment contexts.' + Enabled: pending + VersionAdded: '1.2' + Lint/NonDeterministicRequireOrder: Description: 'Always sort arrays returned by Dir.glob when requiring files.' Enabled: true VersionAdded: '0.78' Safe: false @@ -2034,12 +2040,13 @@ AllowComments: true Lint/UselessSetterCall: Description: 'Checks for useless setter call to a local variable.' Enabled: true + SafeAutoCorrect: false VersionAdded: '0.13' - VersionChanged: '0.80' + VersionChanged: '1.2' Safe: false Lint/UselessTimes: Description: 'Checks for useless `Integer#times` calls.' Enabled: true @@ -2179,10 +2186,11 @@ Naming/BinaryOperatorParameterName: Description: 'When defining binary operators, name the argument other.' StyleGuide: '#other-arg' Enabled: true VersionAdded: '0.50' + VersionChanged: '1.2' Naming/BlockParameterName: Description: >- Checks for block parameter names that contain capital letters, end in numbers, or do not meet a minimal length. @@ -2285,10 +2293,11 @@ Naming/HeredocDelimiterCase: Description: 'Use configured case for heredoc delimiters.' StyleGuide: '#heredoc-delimiters' Enabled: true VersionAdded: '0.50' + VersionChanged: '1.2' EnforcedStyle: uppercase SupportedStyles: - lowercase - uppercase @@ -2303,11 +2312,11 @@ Naming/MemoizedInstanceVariableName: Description: >- Memoized method name should match memo instance variable name. Enabled: true VersionAdded: '0.53' - VersionChanged: '0.58' + VersionChanged: '1.2' EnforcedStyleForLeadingUnderscores: disallowed SupportedStylesForLeadingUnderscores: - disallowed - required - optional @@ -2401,18 +2410,22 @@ SupportedStyles: - snake_case - camelCase Naming/VariableNumber: - Description: 'Use the configured style when numbering variables.' + Description: 'Use the configured style when numbering symbols, methods and variables.' + StyleGuide: '#snake-case-symbols-methods-vars-with-numbers' Enabled: true VersionAdded: '0.50' + VersionChanged: '1.2' EnforcedStyle: normalcase SupportedStyles: - snake_case - normalcase - non_integer + CheckMethodNames: true + CheckSymbols: true #################### Security ############################## Security/Eval: Description: 'The use of eval represents a serious security risk.' @@ -2787,10 +2800,15 @@ Description: 'Avoid the use of class variables.' StyleGuide: '#no-class-vars' Enabled: true VersionAdded: '0.13' +Style/CollectionCompact: + Description: 'Use `{Array,Hash}#{compact,compact!}` instead of custom logic to reject nils.' + Enabled: pending + VersionAdded: '1.2' + # Align with the style guide. Style/CollectionMethods: Description: 'Preferred collection methods.' StyleGuide: '#map-find-select-reduce-include-size' Enabled: false @@ -2984,11 +3002,11 @@ Style/DoubleNegation: Description: 'Checks for uses of double negation (!!).' StyleGuide: '#no-bang-bang' Enabled: true VersionAdded: '0.19' - VersionChanged: '0.84' + VersionChanged: '1.2' EnforcedStyle: allowed_in_returns SafeAutoCorrect: false SupportedStyles: - allowed_in_returns - forbidden @@ -3609,10 +3627,17 @@ # postfix: only use `unless` for negated `if` statements positioned after the body of the statement - both - prefix - postfix +Style/NegatedIfElseCondition: + Description: >- + This cop checks for uses of `if-else` and ternary operators with a negated condition + which can be simplified by inverting condition and swapping branches. + Enabled: pending + VersionAdded: '1.2' + Style/NegatedUnless: Description: 'Favor if over unless for negative conditions.' StyleGuide: '#if-for-negatives' Enabled: true VersionAdded: '0.69' @@ -3886,14 +3911,15 @@ Style/RaiseArgs: Description: 'Checks the arguments passed to raise/fail.' StyleGuide: '#exception-class-messages' Enabled: true VersionAdded: '0.14' - VersionChanged: '0.40' + VersionChanged: '1.2' EnforcedStyle: exploded SupportedStyles: - compact # raise Exception.new(msg) - exploded # raise Exception, msg + AllowedCompactTypes: [] Style/RandomWithOffset: Description: >- Prefer to use ranges when generating random numbers instead of integers with offsets.