summaryrefslogtreecommitdiff
path: root/.rubocop.yml
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2017-02-08 17:09:16 -0500
committerRobert Speicher <rspeicher@gmail.com>2017-06-14 13:16:44 -0500
commit69ad827e829175bebb985c8afe76174f42fc60bc (patch)
tree635f61331140628d439497b36f2c67aeb570a648 /.rubocop.yml
parent557cbba7df35e2f3a27995f1caf77d40a3c223fa (diff)
downloadgitlab-ce-69ad827e829175bebb985c8afe76174f42fc60bc.tar.gz
Add a custom RSpec/SingleLineHook cop
This cop adds an offense when `before`, `after`, or `around` are used as single-line blocks.
Diffstat (limited to '.rubocop.yml')
-rw-r--r--.rubocop.yml7
1 files changed, 7 insertions, 0 deletions
diff --git a/.rubocop.yml b/.rubocop.yml
index 66a40f2cf57..cca36b3b5ee 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -1064,6 +1064,13 @@ RSpec/NotToNot:
RSpec/RepeatedDescription:
Enabled: false
+# Ensure RSpec hook blocks are always multi-line.
+RSpec/SingleLineHook:
+ Enabled: false
+ Exclude:
+ - 'spec/factories/*'
+ - 'spec/requests/api/v3/*'
+
# Checks for stubbed test subjects.
RSpec/SubjectStub:
Enabled: false