Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2017-02-09 01:09:16 +0300
committerRobert Speicher <rspeicher@gmail.com>2017-06-14 21:16:44 +0300
commit69ad827e829175bebb985c8afe76174f42fc60bc (patch)
tree635f61331140628d439497b36f2c67aeb570a648 /.rubocop.yml
parent557cbba7df35e2f3a27995f1caf77d40a3c223fa (diff)
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