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
Style/DateTime: Prefer Date or Time over DateTime.
In this case it is wrong, because Icalendar::Values::Time is totally different from Icalendar::Values::DateTime (first does not include the date at all).
I think the linter should only be triggered on /\b(::)?DateTime\b/ and ignore other things. Or am I missing something?
Expected behavior
Icalendar::Values::DateTime.new(start_at) should not trigger Style/DateTime
Actual behavior
It trigger Style/DateTime
Steps to reproduce the problem
Lint a file with Icalendar::Values::DateTime.new(start_at).
RuboCop version
Include the output of rubocop -V. Here's an example:
I've a file with the following line:
It gives me the following error:
In this case it is wrong, because
Icalendar::Values::Time
is totally different fromIcalendar::Values::DateTime
(first does not include the date at all).I think the linter should only be triggered on
/\b(::)?DateTime\b/
and ignore other things. Or am I missing something?Expected behavior
Icalendar::Values::DateTime.new(start_at)
should not triggerStyle/DateTime
Actual behavior
It trigger
Style/DateTime
Steps to reproduce the problem
Lint a file with
Icalendar::Values::DateTime.new(start_at)
.RuboCop version
Include the output of
rubocop -V
. Here's an example:The text was updated successfully, but these errors were encountered: