Skip to content

Commit

Permalink
Merge pull request #121 from chef/1.7
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Smith <tsmith@chef.io>
  • Loading branch information
tas50 committed Dec 28, 2020
2 parents d50b12c + 926eb65 commit 5b47418
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 7 deletions.
6 changes: 6 additions & 0 deletions config/disable_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ Layout/SpaceAroundOperators:
Enabled: false
Layout/SpaceBeforeBlockBraces:
Enabled: false
Layout/SpaceBeforeBrackets:
Enabled: false
Layout/SpaceBeforeComma:
Enabled: false
Layout/SpaceBeforeComment:
Expand Down Expand Up @@ -201,6 +203,8 @@ Layout/TrailingEmptyLines:
Enabled: false
Layout/TrailingWhitespace:
Enabled: false
Lint/AmbiguousAssignment:
Enabled: false
Lint/AmbiguousBlockAssociation:
Enabled: false
Lint/AmbiguousOperator:
Expand Down Expand Up @@ -613,6 +617,8 @@ Style/HashAsLastArrayItem:
Enabled: false
Style/HashEachMethods:
Enabled: false
Style/HashExcept:
Enabled: false
Style/HashLikeCase:
Enabled: false
Style/HashSyntax:
Expand Down
54 changes: 48 additions & 6 deletions config/upstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ Layout/EmptyLineBetweenDefs:
StyleGuide: '#empty-lines-between-methods'
Enabled: true
VersionAdded: '0.49'
VersionChanged: '1.4'
VersionChanged: '1.7'
EmptyLineBetweenMethodDefs: true
EmptyLineBetweenClassDefs: true
EmptyLineBetweenModuleDefs: true
Expand Down Expand Up @@ -1192,6 +1192,13 @@ Layout/SpaceBeforeBlockBraces:
- no_space
VersionChanged: '0.52'

Layout/SpaceBeforeBrackets:
Description: 'Checks for receiver with a space before the opening brackets.'
StyleGuide: '#space-in-brackets-access'
Enabled: pending
VersionAdded: '1.7'
Safe: false

Layout/SpaceBeforeComma:
Description: 'No spaces before commas.'
Enabled: true
Expand Down Expand Up @@ -1354,6 +1361,11 @@ Layout/TrailingWhitespace:
#################### Lint ##################################
### Warnings

Lint/AmbiguousAssignment:
Description: 'Checks for mistyped shorthand assignments.'
Enabled: pending
VersionAdded: '1.7'

Lint/AmbiguousBlockAssociation:
Description: >-
Checks for ambiguous block association with method when param passed without
Expand Down Expand Up @@ -1396,6 +1408,7 @@ Lint/BinaryOperatorWithIdenticalOperands:
Enabled: true
Safe: false
VersionAdded: '0.89'
VersionChanged: '1.7'

Lint/BooleanSymbol:
Description: 'Check for `:true` and `:false` symbols.'
Expand Down Expand Up @@ -1472,6 +1485,9 @@ Lint/DuplicateBranch:
Description: Checks that there are no repeated bodies within `if/unless`, `case-when` and `rescue` constructs.
Enabled: pending
VersionAdded: '1.3'
VersionChanged: '1.7'
IgnoreLiteralBranches: false
IgnoreConstantBranches: false

Lint/DuplicateCaseCondition:
Description: 'Do not repeat values in case conditionals.'
Expand Down Expand Up @@ -1842,6 +1858,8 @@ Lint/RedundantSplatExpansion:
Description: 'Checks for splat unnecessarily being called on literals.'
Enabled: true
VersionAdded: '0.76'
VersionChanged: '1.7'
AllowPercentLiteralArrayArgument: true

Lint/RedundantStringCoercion:
Description: 'Checks for Object#to_s usage in string interpolation.'
Expand Down Expand Up @@ -2045,6 +2063,11 @@ Lint/UnreachableLoop:
Description: 'This cop checks for loops that will have at most one iteration.'
Enabled: true
VersionAdded: '0.89'
VersionChanged: '1.7'
IgnoredPatterns:
# RSpec uses `times` in its message expectations
# eg. `exactly(2).times`
- !ruby/regexp /(exactly|at_least|at_most)\(\d+\)\.times/

Lint/UnusedBlockArgument:
Description: 'Checks for unused block arguments.'
Expand Down Expand Up @@ -2895,7 +2918,7 @@ Style/CollectionMethods:
StyleGuide: '#map-find-select-reduce-include-size'
Enabled: false
VersionAdded: '0.9'
VersionChanged: '0.27'
VersionChanged: '1.7'
Safe: false
# Mapping from undesired method to desired method
# e.g. to use `detect` over `find`:
Expand All @@ -2910,6 +2933,11 @@ Style/CollectionMethods:
detect: 'find'
find_all: 'select'
member?: 'include?'
# Methods in this array accept a final symbol as an implicit block
# eg. `inject(:+)`
MethodsAcceptingSymbol:
- inject
- reduce

Style/ColonMethodCall:
Description: 'Do not use :: for method call.'
Expand Down Expand Up @@ -2969,6 +2997,7 @@ Style/CommentedKeyword:
Description: 'Do not place comments on the same line as certain keywords.'
Enabled: true
VersionAdded: '0.51'
VersionChanged: '1.7'

Style/ConditionalAssignment:
Description: >-
Expand Down Expand Up @@ -3328,6 +3357,13 @@ Style/HashEachMethods:
VersionAdded: '0.80'
Safe: false

Style/HashExcept:
Description: >-
Checks for usages of `Hash#reject`, `Hash#select`, and `Hash#filter` methods
that can be replaced with `Hash#except` method.
Enabled: pending
VersionAdded: '1.7'

Style/HashLikeCase:
Description: >-
Checks for places where `case-when` represents a simple 1:1
Expand Down Expand Up @@ -3482,6 +3518,7 @@ Style/KeywordParametersOrder:
StyleGuide: '#keyword-parameters-order'
Enabled: true
VersionAdded: '0.90'
VersionChanged: '1.7'

Style/Lambda:
Description: 'Use the new lambda literal syntax for single-line blocks.'
Expand Down Expand Up @@ -3520,7 +3557,7 @@ Style/MethodCallWithArgsParentheses:
StyleGuide: '#method-invocation-parens'
Enabled: false
VersionAdded: '0.47'
VersionChanged: '0.61'
VersionChanged: '1.7'
IgnoreMacros: true
IgnoredMethods: []
IgnoredPatterns: []
Expand Down Expand Up @@ -3554,7 +3591,7 @@ Style/MethodDefParentheses:
StyleGuide: '#method-parens'
Enabled: true
VersionAdded: '0.16'
VersionChanged: '0.35'
VersionChanged: '1.7'
EnforcedStyle: require_parentheses
SupportedStyles:
- require_parentheses
Expand Down Expand Up @@ -3660,6 +3697,7 @@ Style/MultilineMethodSignature:
Description: 'Avoid multi-line method signatures.'
Enabled: false
VersionAdded: '0.59'
VersionChanged: '1.7'

Style/MultilineTernaryOperator:
Description: >-
Expand Down Expand Up @@ -4026,12 +4064,16 @@ Style/RedundantArgument:
Enabled: pending
Safe: false
VersionAdded: '1.4'
VersionChanged: '1.6'
VersionChanged: '1.7'
Methods:
# Array#join
join: ''
# String#split
split: ' '
# String#chomp
chomp: "\n"
# String#chomp!
chomp!: "\n"

Style/RedundantAssignment:
Description: 'Checks for redundant assignment before returning.'
Expand Down Expand Up @@ -4288,7 +4330,7 @@ Style/SingleLineMethods:
StyleGuide: '#no-single-line-methods'
Enabled: true
VersionAdded: '0.9'
VersionChanged: '0.19'
VersionChanged: '1.7'
AllowIfMethodIsEmpty: true

Style/SlicingWithRange:
Expand Down
2 changes: 1 addition & 1 deletion lib/chefstyle/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true
module Chefstyle
VERSION = "1.5.8"
RUBOCOP_VERSION = "1.6.1"
RUBOCOP_VERSION = "1.7.0"
end

0 comments on commit 5b47418

Please sign in to comment.