-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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 encoding method of RuboCop::MagicComment::SimpleComment #5647
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
Can you add a test case(s) for this bug? |
I'll try it. |
htwroclau
force-pushed
the
fix_magic_comment_extract
branch
from
March 7, 2018 10:05
e93ca8a
to
5dbe00c
Compare
It needs a changelog entry and we're good to go. |
htwroclau
force-pushed
the
fix_magic_comment_extract
branch
from
March 9, 2018 10:20
5dbe00c
to
1bea697
Compare
@bbatsov I added the changelog of this PR. |
�$B!.�(BLint/OrderedMagicComments�$B!.�(B cop extracts codes including "encoding:" that is not comment. e.g. `CSV.generate(encoding: Encoding::UTF_8) do |csv|` I think that is solved by adding the condition of "# " before "encoding:".
htwroclau
force-pushed
the
fix_magic_comment_extract
branch
from
March 9, 2018 13:53
1bea697
to
e805abd
Compare
This was referenced Mar 21, 2018
This was referenced Mar 21, 2018
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 PR fixes encoding method of RuboCop::MagicComment::SimpleComment for extracting by mistake of Lint/OrderedMagicComments.
example:
CSV.generate(encoding: Encoding::UTF_8) do |csv|
I think that is solved by adding the condition of ‘# ’ before ‘encoding:’.
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.
rake default
orrake parallel
. It executes all tests and RuboCop for itself, and generates the documentation.