debian-mirror-gitlab/doc/development/code_comments.md

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
802 B
Markdown
Raw Normal View History

2021-01-29 00:20:46 +05:30
---
stage: none
group: unassigned
2022-11-25 23:54:43 +05:30
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
2021-01-29 00:20:46 +05:30
---
2019-09-30 21:07:59 +05:30
# Code comments
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
2021-02-22 17:27:13 +05:30
to the code comment you've created. This allows other developers to quickly
2019-09-30 21:07:59 +05:30
check if a comment is still relevant and what needs to be done to address it.
Examples:
2020-04-08 14:13:33 +05:30
```ruby
2019-09-30 21:07:59 +05:30
# Deprecated scope until code_owner column has been migrated to rule_type.
2020-06-23 00:09:42 +05:30
# To be removed with https://gitlab.com/gitlab-org/gitlab/-/issues/11834.
2019-09-30 21:07:59 +05:30
scope :code_owner, -> { where(code_owner: true).or(where(rule_type: :code_owner)) }
```