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

Update RuboCop to 0.91 #748

Merged
merged 1 commit into from
Sep 15, 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
8 changes: 8 additions & 0 deletions config/disable_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ Layout/ArrayAlignment:
Enabled: false
Layout/AssignmentIndentation:
Enabled: false
Layout/BeginEndAlignment:
Enabled: false
Layout/BlockAlignment:
Enabled: false
Layout/BlockEndNewline:
Expand Down Expand Up @@ -215,6 +217,8 @@ Lint/BooleanSymbol:
Enabled: false
Lint/CircularArgumentReference:
Enabled: false
Lint/ConstantDefinitionInBlock:
Enabled: false
Lint/ConstantResolution:
Enabled: false
Lint/Debugger:
Expand Down Expand Up @@ -267,6 +271,8 @@ Lint/FormatParameterMismatch:
Enabled: false
Lint/HeredocMethodCallPosition:
Enabled: false
Lint/IdentityComparison:
Enabled: false
Lint/ImplicitStringConcatenation:
Enabled: false
Lint/InheritException:
Expand Down Expand Up @@ -395,6 +401,8 @@ Lint/UselessMethodDefinition:
Enabled: false
Lint/UselessSetterCall:
Enabled: false
Lint/UselessTimes:
Enabled: false
Lint/Void:
Enabled: false
Metrics/CyclomaticComplexity:
Expand Down
36 changes: 36 additions & 0 deletions config/upstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ AllCops:
# CacheRootDirectory is ~ (nil), which it is by default, the root will be
# taken from the environment variable `$XDG_CACHE_HOME` if it is set, or if
# `$XDG_CACHE_HOME` is not set, it will be `$HOME/.cache/`.
# The CacheRootDirectory can be overwritten by passing the `--cache-root` command
# line option or by setting `$RUBOCOP_CACHE_ROOT` environment variable.
CacheRootDirectory: ~
# It is possible for a malicious user to know the location of RuboCop's cache
# directory by looking at CacheRootDirectory, and create a symlink in its
Expand Down Expand Up @@ -309,6 +311,19 @@ Layout/AssignmentIndentation:
# But it can be overridden by setting this parameter
IndentationWidth: ~

Layout/BeginEndAlignment:
Description: 'Align ends corresponding to begins correctly.'
Enabled: pending
VersionAdded: '0.91'
# The value `start_of_line` means that `end` should be aligned the start of the line
# where the `begin` keyword is.
# The value `begin` means that `end` should be aligned with the `begin` keyword.
EnforcedStyleAlignWith: start_of_line
SupportedStylesAlignWith:
- start_of_line
- begin
Severity: warning

Layout/BlockAlignment:
Description: 'Align block ends correctly.'
Enabled: true
Expand Down Expand Up @@ -1380,6 +1395,12 @@ Lint/CircularArgumentReference:
Enabled: true
VersionAdded: '0.33'

Lint/ConstantDefinitionInBlock:
Description: 'Do not define constants within a block.'
StyleGuide: '#no-constant-definition-in-block'
Enabled: pending
VersionAdded: '0.91'

Lint/ConstantResolution:
Description: 'Check that constants are fully qualified with `::`.'
Enabled: false
Expand Down Expand Up @@ -1533,6 +1554,12 @@ Lint/HeredocMethodCallPosition:
StyleGuide: '#heredoc-method-calls'
VersionAdded: '0.68'

Lint/IdentityComparison:
Description: 'Prefer `equal?` over `==` when comparing `object_id`.'
Enabled: pending
StyleGuide: '#identity-comparison'
VersionAdded: '0.91'

Lint/ImplicitStringConcatenation:
Description: >-
Checks for adjacent string literals on the same line, which
Expand Down Expand Up @@ -1784,6 +1811,7 @@ Lint/SafeNavigationChain:
- presence
- try
- try!
- in?

Lint/SafeNavigationConsistency:
Description: >-
Expand Down Expand Up @@ -1861,6 +1889,7 @@ Lint/Syntax:
Enabled: true
VersionAdded: '0.9'


Lint/ToJSON:
Description: 'Ensure #to_json includes an optional argument.'
Enabled: true
Expand Down Expand Up @@ -1965,6 +1994,12 @@ Lint/UselessSetterCall:
VersionChanged: '0.80'
Safe: false

Lint/UselessTimes:
Description: 'Checks for useless `Integer#times` calls.'
Enabled: pending
VersionAdded: '0.91'
Safe: false

Lint/Void:
Description: 'Possible use of operator/literal/variable in void context.'
Enabled: true
Expand Down Expand Up @@ -3073,6 +3108,7 @@ Style/GlobalStdStream:
StyleGuide: '#global-stdout'
Enabled: pending
VersionAdded: '0.89'
SafeAutoCorrect: false

Style/GlobalVars:
Description: 'Do not introduce global variables.'
Expand Down
2 changes: 1 addition & 1 deletion lib/cookstyle/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true
module Cookstyle
VERSION = "6.17.7" # rubocop: disable Style/StringLiterals
RUBOCOP_VERSION = '0.90.0'
RUBOCOP_VERSION = '0.91.0'
end