Skip to content

Commit

Permalink
Merge pull request #107 from chef/bump_rubocop
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Smith <tsmith@chef.io>
  • Loading branch information
tas50 committed Oct 8, 2020
2 parents fb934be + 76a42c2 commit aae4684
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
/pkg/
/spec/reports/
/tmp/
/test.rb # used for quick testing of cops
/test.rb # used for quick testing of cops
/vendor/
4 changes: 4 additions & 0 deletions config/chefstyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,10 @@ Style/Dir:
Style/ExpandPathArguments:
Enabled: true

# more code you don't need
Lint/RedundantSafeNavigation:
Enabled: true

ChefRuby/Ruby27KeywordArgumentWarnings:
Description: Pass options to shell_out helpers without the brackets to avoid Ruby 2.7 deprecation warnings.
Enabled: true
Expand Down
6 changes: 6 additions & 0 deletions config/disable_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,8 @@ Lint/FloatOutOfRange:
Enabled: false
Lint/FormatParameterMismatch:
Enabled: false
Lint/HashCompareByIdentity:
Enabled: false
Lint/HeredocMethodCallPosition:
Enabled: false
Lint/IdentityComparison:
Expand Down Expand Up @@ -327,6 +329,8 @@ Lint/RedundantCopEnableDirective:
Enabled: false
Lint/RedundantRequireStatement:
Enabled: false
Lint/RedundantSafeNavigation:
Enabled: false
Lint/RedundantSplatExpansion:
Enabled: false
Lint/RedundantStringCoercion:
Expand Down Expand Up @@ -493,6 +497,8 @@ Style/ClassAndModuleChildren:
Enabled: false
Style/ClassCheck:
Enabled: false
Style/ClassEqualityComparison:
Enabled: false
Style/ClassMethods:
Enabled: false
Style/ClassMethodsDefinitions:
Expand Down
32 changes: 32 additions & 0 deletions config/upstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1546,6 +1546,13 @@ Lint/FormatParameterMismatch:
Enabled: true
VersionAdded: '0.33'

Lint/HashCompareByIdentity:
Description: 'Prefer using `Hash#compare_by_identity` than using `object_id` for keys.'
StyleGuide: '#identity-comparison'
Enabled: pending
Safe: false
VersionAdded: '0.93'

Lint/HeredocMethodCallPosition:
Description: >-
Checks for the ordering of a method call where
Expand Down Expand Up @@ -1746,6 +1753,21 @@ Lint/RedundantRequireStatement:
Enabled: true
VersionAdded: '0.76'

Lint/RedundantSafeNavigation:
Description: 'Checks for redundant safe navigation calls.'
Enabled: pending
VersionAdded: '0.93'
Safe: false
IgnoredMethods:
- to_c
- to_f
- to_i
- to_r
- rationalize
- public_send
- send
- __send__

Lint/RedundantSplatExpansion:
Description: 'Checks for splat unnecessarily being called on literals.'
Enabled: true
Expand Down Expand Up @@ -2702,6 +2724,16 @@ Style/ClassCheck:
- is_a?
- 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
VersionAdded: '0.93'
IgnoredMethods:
- ==
- equal?
- eql?

Style/ClassMethods:
Description: 'Use self when defining module/class methods.'
StyleGuide: '#def-self-class-methods'
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.4.3"
RUBOCOP_VERSION = "0.92.0"
RUBOCOP_VERSION = "0.93.0"
end

0 comments on commit aae4684

Please sign in to comment.