Skip to content

Add cop for formatting iso8601 dates

Martin Schurz requested to merge schurzi/gitlab-styles:iso8601_date into master
  • Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA

What does this MR do and why?

As discussed in gitlab-org/gitlab#410638 (comment 1913955221) this MR adds a cop to make sure we are formatting dates with the .iso8601 function.

The auto correct is intended to always produce working corrections. Sometimes a additional .to_date will be added when we are already working on a date. This is redundant but unproblematic. I suggest we trust in the normal review process to remove this in the cases where it's obvious we are dealing with a date.

Edited by 🤖 GitLab Bot 🤖

Merge request reports

Loading