Lint checker for not using time_ago_in_words helper

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

  • Close this issue

We should add a lint checker for not using time_ago_in_words helper.

I wonder if we could use rubocop to fail instances of time_ago_in_words.

I agree, we should do that! This can be done similarly to other cops that checks against methods not to use: e.g. https://gitlab.com/gitlab-org/gitlab-foss/blob/master/rubocop/cop/migration/add_column.rb.

@tnir This can be done in a follow-up or in this MR, up to you!

gitlab-foss!18607 (comment 71174436)

EDIT: replaced gitlab-ce with gitlab-foss

Edited Sep 28, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading