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

Enable Style/Encoding by default #4445

Merged
merged 1 commit into from
May 30, 2017
Merged

Enable Style/Encoding by default #4445

merged 1 commit into from
May 30, 2017

Conversation

deivid-rodriguez
Copy link
Contributor

@deivid-rodriguez deivid-rodriguez commented May 29, 2017

This cop was made a disabled by default cop back when Ruby 1.9 was still
supported and there was no never enforced style. This is not the case
any more, so we can start making sure that projects do not include
unnecessary encoding magic comments by default.


Before submitting the PR make sure the following are checked:

  • Wrote good commit messages.
  • Commit message starts with [Fix #issue-number] (if the related issue exists).
  • Used the same coding conventions as the rest of the project.
  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Added an entry to the Changelog if the new code introduces user-observable changes. See changelog entry format.
  • All tests are passing.
  • The new code doesn't generate RuboCop offenses.
  • The PR relates to only one subject with a clear title
    and description in grammatically correct, complete sentences.
  • Updated cop documentation with rake generate_cops_documentation (required only when you've added a new cop or changed the configuration/documentation of an existing cop).

This cop was made a disabled by default cop back when Ruby 1.9 was still
supported and there was no `never` enforced style. This is not the case
any more, so we can start making sure that projects do not include
unnecessary encoding magic comments by default.
@bbatsov bbatsov merged commit 5faf140 into rubocop:master May 30, 2017
@bbatsov
Copy link
Collaborator

bbatsov commented May 30, 2017

👍

@deivid-rodriguez deivid-rodriguez deleted the enforce_no_encoding_comments_by_default branch May 30, 2017 09:46
@deivid-rodriguez
Copy link
Contributor Author

Thanks! :)

@@ -6,6 +6,10 @@

* [#4443](https://github.com/bbatsov/rubocop/pull/4443): Prevent `Style/YodaCondition` from breaking `not LITERAL`. ([@pocke][])

### Changes

* [#4444](https://github.com/bbatsov/rubocop/pull/4444): Make `Style/Encoding` cop enabled by default. ([@deivid-rodriguez][])
Copy link
Contributor

Choose a reason for hiding this comment

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

#4444? Don’t you mean #4445?

Copy link
Contributor

Choose a reason for hiding this comment

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

Fixed in #4623.

bquorning added a commit to bquorning/rubocop that referenced this pull request Jul 22, 2017
bbatsov pushed a commit that referenced this pull request Jul 23, 2017
tonyta added a commit to tonyta/fix-db-schema-conflicts that referenced this pull request Oct 25, 2017
As of RuboCop v0.50.0, the Style/Encoding cop is now enabled by default
and configured to remove the encoding magic-comment. This deviates from
the expected behavior in specs and changes the behavior of this gem.

Disabling this cop will ensure that fix_db_schema_conflicts will output
consistently regardless of RuboCop version.

Change in RuboCop:
  rubocop/rubocop#4445
284km added a commit to 284km/guard-rubocop that referenced this pull request Oct 30, 2017
As of RuboCop v0.50.0, the Style/Encoding cop is now enabled by default
and configured to remove the encoding magic-comment.
Details here: rubocop/rubocop#4445
rkledesma added a commit to rentpath/style-guides that referenced this pull request Feb 21, 2018
Style/Encoding is enabled by default now, and the presence of this
setting is throwing errors blocking rubocop execution with newer
versions of rubocop

see:
rubocop/rubocop#4445
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants