2020-10-30 14:08:56 -04:00
---
stage: none
group: unassigned
2022-09-21 17:13:33 -04:00
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments
2020-10-30 14:08:56 -04:00
---
2019-06-25 11:34:35 -04:00
# Code comments
2019-07-08 23:28:41 -04:00
Whenever you add comment to the code that is expected to be addressed at any time
in future, please create a technical debt issue for it. Then put a link to it
2020-11-19 19:09:06 -05:00
to the code comment you've created. This allows other developers to quickly
2019-06-25 11:34:35 -04:00
check if a comment is still relevant and what needs to be done to address it.
2019-07-08 23:28:41 -04:00
Examples:
2019-06-25 11:34:35 -04:00
2020-02-18 13:09:07 -05:00
```ruby
2019-06-25 11:34:35 -04:00
# Deprecated scope until code_owner column has been migrated to rule_type.
2020-05-21 02:08:25 -04:00
# To be removed with https://gitlab.com/gitlab-org/gitlab/-/issues/11834.
2019-06-25 11:34:35 -04:00
scope :code_owner, -> { where(code_owner: true).or(where(rule_type: :code_owner)) }
```