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
[src/api] Update rubocop: 0.87.1 → 0.88.0 (major) #9914
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
depfu
bot
changed the title
[src/api] Update rubocop: 0.86.0 → 0.88.0 (major)
[src/api] Update rubocop: 0.87.1 → 0.88.0 (major)
Jul 14, 2020
depfu
bot
force-pushed
the
depfu/update/srcapi/rubocop-0.88.0
branch
from
July 14, 2020 13:56
5956a9e
to
d5edda8
Compare
Codecov Report
@@ Coverage Diff @@
## master #9914 +/- ##
==========================================
- Coverage 90.53% 90.51% -0.03%
==========================================
Files 565 565
Lines 21264 21244 -20
==========================================
- Hits 19251 19228 -23
- Misses 2013 2016 +3 |
After upgrading the rubocop gem version from 0.87.1 to 0.88.0 the following new cop got introduced and autocorrected: * Style/ArrayCoercion * Style/CaseLikeIf * Style/HashAsLastArrayItem * Style/RedundantFileExtensionInRequire
This fixes the `Style/HashLikeCase` cop which got introduced after the rubocop gem update from version 0.87.1 to 0.88.0
The autocorrection for this part of the code introduced changes in the behaviour of it. Therefore we ignore the cop here, and keep the code as it is.
Address Style/CaseLikeIf cop and move logic from view to a helper method (addressing a FIXME comment).
krauselukas
force-pushed
the
depfu/update/srcapi/rubocop-0.88.0
branch
from
July 17, 2020 11:39
876d92c
to
48b8cc4
Compare
The rubocop autocorrect for Style/CaseLikeIf does not take into account the match operator for regex, which in this case returns the matched data when using it with and if/elsif statement. After just moving this to an case statement, the data is not returned anymore. This could be fixed by using the `$LAST_MATCH_INFO` pseudo variable which contains the whole `MatchData` object of the latest regex matching group.
krauselukas
force-pushed
the
depfu/update/srcapi/rubocop-0.88.0
branch
from
July 17, 2020 11:41
48b8cc4
to
6909ea7
Compare
danidoni
approved these changes
Jul 20, 2020
saraycp
approved these changes
Jul 21, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Here is everything you need to know about this update. Please take a good look at what changed and the test results before merging this pull request.
What changed?
✳️ rubocop (0.87.1 → 0.88.0) · Repo · Changelog
Release Notes
0.88.0
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 68 commits:
Cut 0.88
Add a changelog entry
Ignore configuration files outside of the project
Only look up to the project's root for exclusions
Fix `traverse_files_upwards` to make searching up to the root possible
Merge pull request #8279 from Fatsoma/feature/require_order_block_pass
Merge branch 'master' into feature/require_order_block_pass
Fix line number for empty file offense
Fix expect_offense when annotations missing
Merge pull request #8316 from fatkodima/autocorrect-to-disjunctive_assignment_in_constructor
Support autocorrect for `Lint/DisjunctiveAssignmentInConstructor` cop
Add `--memory` option to `bin/rubocop-profile` (#8318)
Reuse `ConfigStore#for_pwd` in a couple more places
Extract `ConfigStore#for_pwd`
Merge pull request #8315 from eugeneius/percent_literal_delimiters_scrub
Handle invalid characters in Style/PercentLiteralDelimiters
Merge pull request #8313 from koic/prevent_missing_trailing_zero_in_float_type
Prevent missing final zero of version number for docs/antora.yml
Optimize `Lint/DuplicateMethods`, `Lint/NestedMethodDefinition`, `Style/AutoResourceCleanup` and `Style/NumericPredicate` cops a bit
Merge pull request #8310 from eugeneius/required_major_ruby_version
Handle major version requirements in Gemspec/RequiredRubyVersion
Rewrite `Style/TrailingMethodEndStatement` to make it faster
Reduce allocated Sets
Fix LiteralAsCondition when condition
Refactor Lint specs to use expect_offense
Reduce memory usage in `ResultCache#rubocop_checksum`
Optimize `Style/CommentedKeyword` to reduce memory usage
Memoize `Badge#to_s` to reduce memory allocations (#8306)
[Docs] Tweak some markup
[Docs] Fix a typo
[Docs] Remove mention of Bountysource
Refactor spec use expect_correction in Lint cops (#8285)
[Fixes #8286] Allow abbreviated offense messages with `expect_offense`
Rewrite `Layout/SpaceAroundMethodCallOperator` cop to make it faster
Merge pull request #8292 from tejasbubane/fix-8289
Remove `PathUtil.pwd` and `PathUtil.chdir`
Remove a redundant changelog entry
Add `of` to `AllowedNames` of `MethodParameterName` cop
Sort `AllowedNames` of `MethodParameterName` cop
[Fix #8189] Consider spaces for Layout/MultilineBlockLayout
Fix `Style/AccessorGrouping` to not register offense for accessor with comment
Join lines because the line length limit is now higher
Swith to opposite style since it's preferred
Refactor `last_file_upwards` to not build an intermmediate array
Small file finding refactor
Add new `Style/ArrayCoercion` cop
Add new `Lint/DuplicateElsifCondition` cop
Merge pull request #8287 from tejasbubane/fix-8282
Fix `Style/IfUnlessModifier` bad precedence detection
Add new `Style/CaseLikeIf` cop
Add new `Style/RedundantFileExtensionInRequire` cop
Add new `Style/HashLikeCase` cop
Move a couple of changelog entries
[Fix #7776] Generate valid code if comment exists before closing brace (#8237)
Merge pull request #8271 from fatkodima/hash-array-last-item
[Fixes #8273] Fix false positive for Style/WhileUntilModifier.
Add new `Style/HashAsLastArrayItem` cop
Use expect_correction in Lint/NonDeterministicRequireOrder spec
Detect require method as arg in Lint/NonDeterministicRequireOrder
Refactor
expect_offense: coerce replacements to string
Remove unneeded include
Remove unnecessary logic from MissingElse
[Fix #8232] Fix a false positive for `Layout/EmptyLinesAroundAccessModifier`
Runner: refactor
Update index.adoc
Basic support for profiling with bin/rubocop-profile
[Docs] Switch back to master
Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with
@depfu rebase
.All Depfu comment commands