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
[Fix #197] Disable Performance/ArraySemiInfiniteRangeSlice
cop
#199
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
It's not just unsafe, it is unsound, see #198 |
tejasbubane
changed the title
[Fix #197] Mark
[Fix #197] Disable Nov 23, 2020
Performance/ArraySemiInfiniteRangeSlice
cop as unsafePerformance/ArraySemiInfiniteRangeSlice
cop
tejasbubane
force-pushed
the
fix-197
branch
2 times, most recently
from
November 23, 2020 17:31
5f60d7c
to
2d4834c
Compare
@marcandre Disabled. Also marked as unsafe in case some users enable it in their project configs but run into the string slices. |
marcandre
approved these changes
Nov 23, 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
koic
reviewed
Nov 23, 2020
koic
reviewed
Nov 23, 2020
koic
reviewed
Nov 23, 2020
tejasbubane
force-pushed
the
fix-197
branch
2 times, most recently
from
November 24, 2020 05:31
0a382e8
to
8a9eaa4
Compare
@koic Changes done. |
koic
reviewed
Nov 24, 2020
This cop was created due to a mistake in microbenchmark Refer rubocop#175 (comment) Closes rubocop#197, rubocop#198
Thanks! |
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.
This cop is unsafe for string slices because string does not have
#take
and#drop
methods. Although we could change the cop to skip literal strings, it still remains unsafe for variables which we cannot determine statically if they are arrays or strings.Closes #197, #198
Before submitting the PR make sure the following are checked:
[Fix #issue-number]
(if the related issue exists).master
(if not - rebase it).and description in grammatically correct, complete sentences.
bundle exec rake default
. It executes all tests and RuboCop for itself, and generates the documentation.