Commit e8a7ac80 authored by Markus Koller's avatar Markus Koller

Add comment to justify the use of a case statement

parent 790793d9
...@@ -11,6 +11,9 @@ module Gitlab ...@@ -11,6 +11,9 @@ module Gitlab
class << self class << self
include ActionView::RecordIdentifier include ActionView::RecordIdentifier
# Using a case statement here is preferable for readability and maintainability.
# See discussion in https://gitlab.com/gitlab-org/gitlab/-/issues/217397
#
# rubocop:disable Metrics/CyclomaticComplexity # rubocop:disable Metrics/CyclomaticComplexity
def build(object, **options) def build(object, **options)
# Objects are sometimes wrapped in a BatchLoader instance # Objects are sometimes wrapped in a BatchLoader instance
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment