Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vendor rubocop-0.88.0 upstream configuration. #95

Merged
merged 1 commit into from
Jul 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions config/disable_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,8 @@ Lint/DisjunctiveAssignmentInConstructor:
Enabled: false
Lint/DuplicateCaseCondition:
Enabled: false
Lint/DuplicateElsifCondition:
Enabled: false
Lint/DuplicateHashKey:
Enabled: false
Lint/DuplicateMethods:
Expand Down Expand Up @@ -427,6 +429,8 @@ Style/Alias:
Enabled: false
Style/AndOr:
Enabled: false
Style/ArrayCoercion:
Enabled: false
Style/ArrayJoin:
Enabled: false
Style/AsciiComments:
Expand All @@ -447,6 +451,8 @@ Style/BlockDelimiters:
Enabled: false
Style/CaseEquality:
Enabled: false
Style/CaseLikeIf:
Enabled: false
Style/CharacterLiteral:
Enabled: false
Style/ClassAndModuleChildren:
Expand Down Expand Up @@ -533,8 +539,12 @@ Style/GlobalVars:
Enabled: false
Style/GuardClause:
Enabled: false
Style/HashAsLastArrayItem:
Enabled: false
Style/HashEachMethods:
Enabled: false
Style/HashLikeCase:
Enabled: false
Style/HashSyntax:
Enabled: false
Style/HashTransformKeys:
Expand Down Expand Up @@ -575,6 +585,8 @@ Style/RedundantAssignment:
Enabled: false
Style/RedundantFetchBlock:
Enabled: false
Style/RedundantFileExtensionInRequire:
Enabled: false
Style/MethodCalledOnDoEndBlock:
Enabled: false
Style/MethodDefParentheses:
Expand Down
63 changes: 57 additions & 6 deletions config/upstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1397,12 +1397,18 @@ Lint/DisjunctiveAssignmentInConstructor:
Enabled: true
Safe: false
VersionAdded: '0.62'
VersionChanged: '0.88'

Lint/DuplicateCaseCondition:
Description: 'Do not repeat values in case conditionals.'
Enabled: true
VersionAdded: '0.45'

Lint/DuplicateElsifCondition:
Description: 'Do not repeat conditions used in if `elsif`.'
Enabled: 'pending'
VersionAdded: '0.88'

Lint/DuplicateHashKey:
Description: 'Check for duplicate keys in hash literals.'
Enabled: true
Expand Down Expand Up @@ -2179,17 +2185,18 @@ Naming/MethodParameterName:
AllowNamesEndingInNumbers: true
# Allowed names that will not register an offense
AllowedNames:
- io
- id
- to
- at
- by
- 'on'
- db
- id
- in
- at
- io
- ip
- db
- of
- 'on'
- os
- pp
- to
# Forbidden names that will register an offense
ForbiddenNames: []

Expand Down Expand Up @@ -2340,6 +2347,14 @@ Style/AndOr:
- always
- conditionals

Style/ArrayCoercion:
Description: >-
Use Array() instead of explicit Array check or [*var], when dealing
with a variable you want to treat as an Array, but you're not certain it's an array.
StyleGuide: '#array-coercion'
Enabled: 'pending'
VersionAdded: '0.88'

Style/ArrayJoin:
Description: 'Use Array#join instead of Array#*.'
StyleGuide: '#array-join'
Expand Down Expand Up @@ -2522,6 +2537,12 @@ Style/CaseEquality:
# String === "string"
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'
VersionAdded: '0.88'

Style/CharacterLiteral:
Description: 'Checks for uses of character literals.'
StyleGuide: '#no-character-literals'
Expand Down Expand Up @@ -2961,13 +2982,35 @@ Style/GuardClause:
# needs to have to trigger this cop
MinBodyLength: 1

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'
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
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'
VersionAdded: '0.88'
# `MinBranchesCount` defines the number of branches `case` needs to have
# to trigger this cop
MinBranchesCount: 3

Style/HashSyntax:
Description: >-
Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax
Expand Down Expand Up @@ -3665,6 +3708,14 @@ Style/RedundantFetchBlock:
SafeForConstants: false
VersionAdded: '0.86'

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'
VersionAdded: '0.88'

Style/RedundantFreeze:
Description: "Checks usages of Object#freeze on immutable objects."
Enabled: true
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.1.4"
RUBOCOP_VERSION = "0.87.1"
RUBOCOP_VERSION = "0.88.0"
end