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

allow paremeter name pp for pretty_print #7652

Merged
merged 1 commit into from Jan 31, 2020
Merged

allow paremeter name pp for pretty_print #7652

merged 1 commit into from Jan 31, 2020

Conversation

masarakki
Copy link
Contributor

@masarakki masarakki commented Jan 15, 2020

pp is standard parameter name for PrettyPrint


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).
  • 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.
  • The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
  • Run bundle exec rake default. It executes all tests and RuboCop for itself, and generates the documentation.

@pocke
Copy link
Collaborator

pocke commented Jan 15, 2020

For more information:
pp is usually used for pretty_print method that customizes the result of pretty_inspect.
https://github.com/ruby/ruby/blob/815807d2ab9e87b5543d6837234952fd6cd481a3/lib/pp.rb#L47-L48

@koic
Copy link
Member

koic commented Jan 15, 2020

Can you add the change log entry? The following is an example (The cop name and allowed name in the changelog entry is different).
03f66a6

@masarakki masarakki changed the title allow-paremeter-pp allow paremeter name pp for pretty_print Jan 25, 2020
@masarakki
Copy link
Contributor Author

added

CHANGELOG.md Outdated
@@ -13,6 +13,7 @@
* [#7636](https://github.com/rubocop-hq/rubocop/issues/7636): Remove `console` from `Lint/Debugger` to prevent false positives. ([@gsamokovarov][])
* [#7641](https://github.com/rubocop-hq/rubocop/issues/7641): **(Breaking)** Remove `Style/BracesAroundHashParameters` cop. ([@pocke][])
* Add the method name to highlight area of `Layout/EmptyLineBetweenDefs` to help provide more context. ([@rrosenblum][])
* [#7652](https://github.com/rubocop-hq/rubocop/pull/7652): Allow parameter name `pp` for overriding `pretty_print`. ([@masarakki][])
Copy link
Member

Choose a reason for hiding this comment

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

I think it will be clearer if the cop name is specified. e.g:

-* [#7652](https://github.com/rubocop-hq/rubocop/pull/7652): Allow parameter name `pp` for overriding `pretty_print`. ([@masarakki][])
+* [#7652](https://github.com/rubocop-hq/rubocop/pull/7652): Allow `pp` to allowed names of `Naming/MethodParameterName` cop in default config. ([@masarakki][])

@masarakki
Copy link
Contributor Author

updated

@koic koic merged commit d67ba35 into rubocop:master Jan 31, 2020
@koic
Copy link
Member

koic commented Jan 31, 2020

Thanks!

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.

None yet

3 participants