summaryrefslogtreecommitdiff
path: root/doc/development/code_comments.md
blob: b0e83b29cb0f1de8f5627c281333d7ac9eacc0d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# 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
to the code comment you've created. This will allow other developers to quickly
check if a comment is still relevant and what needs to be done to address it.

Examples:

```ruby
# Deprecated scope until code_owner column has been migrated to rule_type.
# To be removed with https://gitlab.com/gitlab-org/gitlab/-/issues/11834.
scope :code_owner, -> { where(code_owner: true).or(where(rule_type: :code_owner)) }
```