summaryrefslogtreecommitdiff
path: root/doc/development/gotchas.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/development/gotchas.md')
-rw-r--r--doc/development/gotchas.md14
1 files changed, 10 insertions, 4 deletions
diff --git a/doc/development/gotchas.md b/doc/development/gotchas.md
index cc3db267d53..691027f385f 100644
--- a/doc/development/gotchas.md
+++ b/doc/development/gotchas.md
@@ -1,3 +1,9 @@
+---
+stage: none
+group: unassigned
+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/#designated-technical-writers
+---
+
# Gotchas
The purpose of this guide is to document potential "gotchas" that contributors
@@ -157,7 +163,7 @@ allow_next_found_instance_of(Project) do |project|
end
```
-_**Note:** Since Active Record is not calling the `.new` method on model classes to instantiate the objects,
+Since Active Record is not calling the `.new` method on model classes to instantiate the objects,
you should use `expect_next_found_instance_of` or `allow_next_found_instance_of` mock helpers to setup mock on objects returned by Active Record query & finder methods._
If we also want to initialize the instance with some particular arguments, we
@@ -182,7 +188,7 @@ refresh_service.execute(oldrev, newrev, ref)
See ["Why is it bad style to `rescue Exception => e` in Ruby?"](https://stackoverflow.com/questions/10048173/why-is-it-bad-style-to-rescue-exception-e-in-ruby).
-_**Note:** This rule is [enforced automatically by
+This rule is [enforced automatically by
RuboCop](https://gitlab.com/gitlab-org/gitlab-foss/blob/8-4-stable/.rubocop.yml#L911-914)._
## Do not use inline JavaScript in views
@@ -190,8 +196,8 @@ RuboCop](https://gitlab.com/gitlab-org/gitlab-foss/blob/8-4-stable/.rubocop.yml#
Using the inline `:javascript` Haml filters comes with a
performance overhead. Using inline JavaScript is not a good way to structure your code and should be avoided.
-_**Note:** We've [removed these two filters](https://gitlab.com/gitlab-org/gitlab/blob/master/config/initializers/hamlit.rb)
-in an initializer._
+We've [removed these two filters](https://gitlab.com/gitlab-org/gitlab/blob/master/config/initializers/hamlit.rb)
+in an initializer.
### Further reading