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

Change Style/RedundantFreeze message #3761

Merged
merged 2 commits into from
Dec 19, 2016

Conversation

lucasuyezu
Copy link
Contributor

@lucasuyezu lucasuyezu commented Dec 1, 2016

This commit changes the message for Style/RedundantFreeze. The new message is less aggressive and is more uniform with other messages in the code base, like Lint/HandleExceptions.


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).

@@ -14,7 +14,7 @@ module Style
class RedundantFreeze < Cop
include FrozenStringLiteral

MSG = 'Freezing immutable objects is pointless.'.freeze
MSG = "Do not freeze immutable objects.".freeze

Choose a reason for hiding this comment

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

How about:

Freezing immutable objects has no effect.

That explains the why as well as giving the instruction.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Or "Do not freeze immutable objects, as freezing them has no effect.".

Copy link

@kmcphillips kmcphillips left a comment

Choose a reason for hiding this comment

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

👌 for making this less aggressive.

@lucasuyezu lucasuyezu force-pushed the change_redundant_freeze_message branch 2 times, most recently from 2759415 to 1acdb86 Compare December 6, 2016 19:12
@lucasuyezu
Copy link
Contributor Author

@bbatsov Message updated.

@bbatsov
Copy link
Collaborator

bbatsov commented Dec 13, 2016

You've broken the build by changing the style of the string quotes. You'll also need to rebase.

@lucasuyezu lucasuyezu force-pushed the change_redundant_freeze_message branch from 1acdb86 to da7d5d8 Compare December 13, 2016 16:10
@bbatsov
Copy link
Collaborator

bbatsov commented Dec 15, 2016

The build is still failing.

@lucasuyezu lucasuyezu force-pushed the change_redundant_freeze_message branch from da7d5d8 to 990ad58 Compare December 15, 2016 22:55
@lucasuyezu lucasuyezu force-pushed the change_redundant_freeze_message branch from 990ad58 to 3627cf3 Compare December 15, 2016 23:11
@bbatsov bbatsov merged commit 151879a into rubocop:master Dec 19, 2016
@lucasuyezu lucasuyezu deleted the change_redundant_freeze_message branch May 28, 2018 21:47
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