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 autocorrection for Style/DateTime #8738

Merged
merged 2 commits into from Sep 25, 2020

Conversation

dvandersluis
Copy link
Member

Style/DateTime did not have autocorrection enabled, so I added it to replace DateTime with Time. I have marked this as unsafe because we are not checking if the date being used is historic or not (unless a start parameter is passed in, such as in iso8601, in which case an offense isn't registered anyways).

I did not enable autocorrection for to_datetime because the message just states to not use it.


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.

@dvandersluis dvandersluis force-pushed the style-date-time-autocorrection branch 3 times, most recently from 1803f5a to d15f7ac Compare September 16, 2020 16:05
Copy link
Contributor

@marcandre marcandre left a comment

Choose a reason for hiding this comment

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

LGTM

@dvandersluis
Copy link
Member Author

@koic @marcandre would this be okay to merge now?

@koic
Copy link
Member

koic commented Sep 21, 2020

The next release may be 0.91.1 (bug fix) and I'm not sure about next release version. I would like to merge when the next release is decided to be 0.92.

@dvandersluis
Copy link
Member Author

@koic makes perfect sense!

@bbatsov
Copy link
Collaborator

bbatsov commented Sep 23, 2020

I'll cut the new release later today.

@dvandersluis
Copy link
Member Author

dvandersluis commented Sep 23, 2020

@bbatsov @koic updated for post 0.91.1.

@bbatsov bbatsov merged commit fb27511 into rubocop:master Sep 25, 2020
@bbatsov
Copy link
Collaborator

bbatsov commented Sep 25, 2020

Thanks!

@dvandersluis dvandersluis deleted the style-date-time-autocorrection branch January 18, 2021 20:42
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

4 participants