Add Style/SelfAssignment Rubocop cop

The cop enforces use of self assignment operator E.g. a=a+2 gets
written as a+=2. Also the offenses listed in rubocop.todo.yml
have been corrected automatically with the --auto-correct option.
Fixes issue #1531
This commit is contained in:
divyanshumehta 2017-06-12 22:37:45 +05:30
parent be72b9d02e
commit cdf794ecbf
5 changed files with 7 additions and 13 deletions

View file

@ -721,14 +721,6 @@ Style/RegexpLiteral:
Exclude:
- 'Guardfile'
# Offense count: 3
# Cop supports --auto-correct.
Style/SelfAssignment:
Exclude:
- 'app/models/event.rb'
- 'db/migrate/20141104131625_generate_username.rb'
- 'spec/support/save_feature_failures.rb'
# Offense count: 3
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.