You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add new "Prefer all_(day|week|month|quarter|year) over range of date/time" rule
Follow up rubocop/rubocop-rails#730.
This PR adds new "Prefer `all_(day|week|month|quarter|year)` over range of date/time" rule.
```ruby
# bad
date.beginning_of_day..date.end_of_day
date.beginning_of_week..date.end_of_week
date.beginning_of_month..date.end_of_month
date.beginning_of_quarter..date.end_of_quarter
date.beginning_of_year..date.end_of_year
# good
date.all_day
date.all_week
date.all_month
date.all_quarter
date.all_year
```
0 commit comments