Commit ac109867 authored by Furkan Ayhan's avatar Furkan Ayhan

Add Rails/SaveBang Rubocop rule for tests

When updating an ActiveRecord object, result of create, update, destroy,
save should be checked whether if it is true or not.
It is not important to handle the result of update,
however we need to make sure of successful update.

Since this is just an introduction commit, some files will be excluded.
parent 4c1dff36
......@@ -447,3 +447,12 @@ Rails/TimeZone:
- 'spec/models/**/*'
- 'ee/app/models/**/*'
- 'ee/spec/models/**/*'
# WIP: See https://gitlab.com/gitlab-org/gitlab/-/issues/220040
Rails/SaveBang:
Enabled: true
Include:
- 'spec/**/*.rb'
- 'ee/spec/**/*.rb'
- 'qa/spec/**/*.rb'
- 'qa/qa/specs/**/*.rb'
This diff is collapsed.
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