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

Bump rubocop from 0.93.1 to 1.8.0 #2072

Merged
merged 3 commits into from
Jan 11, 2021
Merged

Conversation

dependabot-preview[bot]
Copy link
Contributor

@dependabot-preview dependabot-preview bot commented Jan 7, 2021

Bumps rubocop from 0.93.1 to 1.8.0.

Release notes

Sourced from rubocop's releases.

RuboCop 1.8

New features

Bug fixes

  • #9298: Fix an incorrect auto-correct for Lint/RedundantCopDisableDirective when there is a blank line before inline comment. (@koic)
  • #9233: Fix Style/SoleNestedConditional copying non-relevant comments during auto-correction. (@Darhazer)
  • #9312: Fix Layout/FirstHashElementLineBreak to apply to multi-line hashes with only a single element. (@muirdm)
  • #9316: Fix Style/EmptyLiteral registering wrong offense when using a numbered block for Hash.new, i.e. Hash.new { _1[_2] = [] }. (@agargiulo)
  • #9308: Fix an error for Layout/EmptyLineBetweenDefs when using endless class method. (@koic)
  • #9314: Fix an incorrect auto-correct for Style/RedundantReturn when multiple return values have a parenthesized return value. (@koic)
  • #9335: Fix an incorrect auto-correct for EnforcedStyle: require_parentheses of Style/MethodCallWithArgsParentheses with Style/NestedParenthesizedCalls. (@koic)
  • #9290: Fix a false positive for Layout/SpaceBeforeBrackets when using array literal method argument. (@koic)
  • #9333: Fix an error for Style/IfInsideElse when using a modifier if nested inside an else after elsif. (@koic)
  • #9303: Fix an incorrect auto-correct for Style/RaiseArgs with EnforcedStyle: compact when using exception instantiation argument. (@koic)

Changes

  • #9300: Make Lint/NonDeterministicRequireOrder not to register offense when using Ruby 3.0 or higher. (@koic)
  • #9320: Support unicode-display_width v2. (@dduugg)
  • #9288: Require Parser 3.0.0.0 or higher. (@koic)
  • #9337: Add AllowedIdentifiers to Naming/VariableName. (@dvandersluis)
  • #9295: Update Style/SingleLineMethods to correct to an endless method definition if they are allowed. (@dvandersluis)
  • #9331: Mark Style/MutableConstant as unsafe. (@koic)

RuboCop 1.7

New features

  • #9260: Support auto-correction for Style/MultilineMethodSignature. (@koic)
  • #9282: Make Style/RedundantFreeze and Style/MutableConstant cops aware of frozen regexp and range literals when using Ruby 3.0. (@koic)
  • #9223: Add new Lint/AmbiguousAssignment cop. ([@fatkodima][])
  • #9243: Support auto-correction for Style/CommentedKeyword. (@koic)
  • #9283: Add new Style/HashExcept cop. (@koic)
  • #9231: Add new Layout/SpaceBeforeBrackets cop. (@koic)

Bug fixes

Changelog

Sourced from rubocop's changelog.

1.8.0 (2021-01-07)

New features

Bug fixes

  • #9298: Fix an incorrect auto-correct for Lint/RedundantCopDisableDirective when there is a blank line before inline comment. ([@koic][])
  • #9233: Fix Style/SoleNestedConditional copying non-relevant comments during auto-correction. ([@Darhazer][])
  • #9312: Fix Layout/FirstHashElementLineBreak to apply to multi-line hashes with only a single element. ([@muirdm][])
  • #9316: Fix Style/EmptyLiteral registering wrong offense when using a numbered block for Hash.new, i.e. Hash.new { _1[_2] = [] }. ([@agargiulo][])
  • #9308: Fix an error for Layout/EmptyLineBetweenDefs when using endless class method. ([@koic][])
  • #9314: Fix an incorrect auto-correct for Style/RedundantReturn when multiple return values have a parenthesized return value. ([@koic][])
  • #9335: Fix an incorrect auto-correct for EnforcedStyle: require_parentheses of Style/MethodCallWithArgsParentheses with Style/NestedParenthesizedCalls. ([@koic][])
  • #9290: Fix a false positive for Layout/SpaceBeforeBrackets when using array literal method argument. ([@koic][])
  • #9333: Fix an error for Style/IfInsideElse when using a modifier if nested inside an else after elsif. ([@koic][])
  • #9303: Fix an incorrect auto-correct for Style/RaiseArgs with EnforcedStyle: compact when using exception instantiation argument. ([@koic][])

Changes

  • #9300: Make Lint/NonDeterministicRequireOrder not to register offense when using Ruby 3.0 or higher. ([@koic][])
  • #9320: Support unicode-display_width v2. ([@dduugg][])
  • #9288: Require Parser 3.0.0.0 or higher. ([@koic][])
  • #9337: Add AllowedIdentifiers to Naming/VariableName. ([@dvandersluis][])
  • #9295: Update Style/SingleLineMethods to correct to an endless method definition if they are allowed. ([@dvandersluis][])
  • #9331: Mark Style/MutableConstant as unsafe. ([@koic][])

1.7.0 (2020-12-25)

New features

  • #9260: Support auto-correction for Style/MultilineMethodSignature. ([@koic][])
  • #9282: Make Style/RedundantFreeze and Style/MutableConstant cops aware of frozen regexp and range literals when using Ruby 3.0. ([@koic][])
  • #9223: Add new Lint/AmbiguousAssignment cop. ([@fatkodima][])
  • #9243: Support auto-correction for Style/CommentedKeyword. ([@koic][])
  • #9283: Add new Style/HashExcept cop. ([@koic][])
  • #9231: Add new Layout/SpaceBeforeBrackets cop. ([@koic][])

Bug fixes

  • #9232: Fix Style/SymbolProc registering wrong offense when using a symbol numbered block argument greater than 1, i.e. [[1, 2]].map { _2.succ }. ([@tdeo][])
  • #9274: Fix error in Metrics/ClassLength when the class only contains comments. ([@dvandersluis][])
  • #9213: Fix a false positive for Style/RedanduntFreeze when using Array#*. ([@koic][])
  • #9279: Add support for endless methods to Style/MethodCallWithArgsParentheses. ([@dvandersluis][])
  • #9245: Fix Lint/AmbiguousRegexpLiteral when given a match_with_lvasgn node. ([@dvandersluis][])
  • #9276: Add support for endless methods to Style/SingleLineMethods. ([@dvandersluis][])
Commits
  • 0af1a84 Cut 1.8
  • 0073a14 Update Changelog
  • a2d7e0a Improve handling of comments in ClassMethodsDefinition autocorrection
  • 3fea162 [Fix #9233] Improve handling of comments in SoleNestedConditional autocorrection
  • 9eb5daf Update Style/SingleLineMethods to correct to an endless method definition i...
  • 1063b4e [Fix #9337] Add AllowedIdentifiers to Naming/VariableName.
  • b734f24 Use IRB instead of Pry
  • 653df19 [Fix #9335] Fix an incorrect auto-correct for NestedParenthesizedCalls
  • e2718b4 [Fix #9333] Fix an error for Style/IfInsideElse
  • c0d28ef Add new Lint/DeprecatedConstants cop
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
  • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot dashboard:

  • Update frequency (including time of day and day of week)
  • Pull request limits (per update run and/or open at any time)
  • Automerge options (never/patch/minor, and dev/runtime dependencies)
  • Out-of-range updates (receive only lockfile updates, if desired)
  • Security updates (receive only security updates, if desired)

@dependabot-preview dependabot-preview bot added dependencies ruby Pull requests that update Ruby code labels Jan 7, 2021
@dependabot-preview dependabot-preview bot force-pushed the dependabot/bundler/rubocop-1.8.0 branch from e8fa518 to b12ece6 Compare January 7, 2021 16:20
Copy link
Member

@pgwillia pgwillia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have made some style changes that were suggested by rubocop.

- bin/yarn

Naming/VariableNumber:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Naming/VariableNumber: Use normalcase for symbol numbers. (https://rubystyle.guide#snake-case-symbols-methods-vars-with-numbers). But we use normalcase most of the time and snake_case for the http status codes and licenses. Don't think its a big deal to mix these so ignoring.

@@ -63,7 +63,7 @@ def edit; end

def update
if params[:community][:logo].present?
# Note: monkey patch to ActiveStorage removes any previous versions
# NOTE: monkey patch to ActiveStorage removes any previous versions
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/CommentAnnotation: Annotation keywords like Note should be all upper case, followed by a colon, and a space, then a note describing the problem. (https://rubystyle.guide#annotate-keywords)

@@ -1,5 +1,6 @@
# Some useful errors
class Exporters::Solr::IndexRoleInvalidError < StandardError; end

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Layout/EmptyLineBetweenDefs: Use empty lines between class definitions. (https://rubystyle.guide#empty-lines-between-methods)

@pgwillia pgwillia force-pushed the dependabot/bundler/rubocop-1.8.0 branch from c4db9ac to 4492c9d Compare January 7, 2021 19:01
@@ -12,8 +12,7 @@
b.optional :min_max
b.optional :readonly

b.use :label, class: 'col-form-label' do
end
b.use :label, class: 'col-form-label'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lint/EmptyBlock: Empty block detected.

Copy link
Contributor

@murny murny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Good work on fixing these 👍

murny
murny previously approved these changes Jan 11, 2021
@pgwillia pgwillia force-pushed the dependabot/bundler/rubocop-1.8.0 branch from fb665ab to 7492c4c Compare January 11, 2021 18:32
dependabot-preview bot and others added 3 commits January 11, 2021 11:32
Rubocop released 1.0 in October and have been moving quickly with updates.  Seems stable at this point and worth updating.

Style/CommentAnnotation: Annotation keywords like Note should be all upper case, followed by a colon, and a space, then a note describing the problem. (https://rubystyle.guide#annotate-keywords)

Naming/VariableNumber: Use normalcase for symbol numbers. (https://rubystyle.guide#snake-case-symbols-methods-vars-with-numbers).  But we use normalcase most of the time and snake_case for the http status codes and licenses. Don't think its a big deal to mix these so ignoring.

Layout/EmptyLineBetweenDefs: Use empty lines between class definitions. (https://rubystyle.guide#empty-lines-between-methods)

Lint/EmptyBlock: Empty block detected.
Copy link
Contributor

@mbarnett mbarnett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@pgwillia pgwillia merged commit b525e88 into master Jan 11, 2021
@pgwillia pgwillia deleted the dependabot/bundler/rubocop-1.8.0 branch January 11, 2021 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies ruby Pull requests that update Ruby code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants