2020-10-30 18:08:56 +00:00
---
stage: none
group: unassigned
2020-11-26 06:09:20 +00:00
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
2020-10-30 18:08:56 +00:00
---
2019-06-25 15:34:35 +00:00
# Code comments
2019-07-09 03:28:41 +00: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-20 00:09:06 +00:00
to the code comment you've created. This allows other developers to quickly
2019-06-25 15:34:35 +00:00
check if a comment is still relevant and what needs to be done to address it.
2019-07-09 03:28:41 +00:00
Examples:
2019-06-25 15:34:35 +00:00
2020-02-18 18:09:07 +00:00
```ruby
2019-06-25 15:34:35 +00:00
# Deprecated scope until code_owner column has been migrated to rule_type.
2020-05-21 06:08:25 +00:00
# To be removed with https://gitlab.com/gitlab-org/gitlab/-/issues/11834.
2019-06-25 15:34:35 +00:00
scope :code_owner, -> { where(code_owner: true).or(where(rule_type: :code_owner)) }
```