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

[Fix #184] Fix Rake/Environment to allow task with no block #185

Merged
merged 1 commit into from
Jan 5, 2020
Merged

[Fix #184] Fix Rake/Environment to allow task with no block #185

merged 1 commit into from
Jan 5, 2020

Conversation

hanachin
Copy link
Contributor

@hanachin hanachin commented Jan 5, 2020

Fixes #184 .


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.


it 'does not register an offense to task with no block' do
expect_no_offenses(<<~RUBY)
task(:spec).clear
Copy link
Member

Choose a reason for hiding this comment

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

This is a nitpick. do_something will be a more generic naming than clear.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! I updated to task(:spec).clear to task(:foo).do_something

@koic
Copy link
Member

koic commented Jan 5, 2020

@hanachin
Copy link
Contributor Author

hanachin commented Jan 5, 2020

@koic I added the changelog entry.

CHANGELOG.md Outdated
@@ -2,6 +2,10 @@

## master (unreleased)

### Bug fixes

* [#184](https://github.com/rubocop-hq/rubocop-rails/issues/184): Fix Rake/Environment to allow task with no block. ([@hanachin][])
Copy link
Member

Choose a reason for hiding this comment

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

Can you enclose the cop name in backticks?

-* [#184](https://github.com/rubocop-hq/rubocop-rails/issues/184): Fix Rake/Environment to allow task with no block. ([@hanachin][])
+* [#184](https://github.com/rubocop-hq/rubocop-rails/issues/184): Fix `Rake/Environment` to allow task with no block. ([@hanachin][])

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes I can 💪

@koic koic merged commit 92c3c6f into rubocop:master Jan 5, 2020
@koic
Copy link
Member

koic commented Jan 5, 2020

Thanks!

@hanachin hanachin deleted the allow_task_with_no_block branch January 5, 2020 16:08
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.

Rails/RakeEnvironment false positive when calling .clear
2 participants