Skip to content

Commit

Permalink
Chore: Remove Warnings
Browse files Browse the repository at this point in the history
Because:
* We were getting quite a few warnings about adding new cops to our Rubocop.yml file and the warning list grew everytime we bumped Rubocop.

This commit:
* Enables all new cops to get rid of the warnings now and in the future.
  • Loading branch information
KevinMulhern committed Apr 15, 2021
1 parent 80fd2ab commit 243438b
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .rspec
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
--color
--require spec_helper
--require rails_helper
3 changes: 1 addition & 2 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ AllCops:
- 'bin/*'
- 'node_modules/**/*'
- db/schema.rb


NewCops: enable

Layout/LineLength:
Max: 120
Expand Down
2 changes: 1 addition & 1 deletion app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def active_for_authentication?
end

def inactive_message
!banned? ? super : :banned
banned? ? :banned : super
end

def dismissed_flags
Expand Down
2 changes: 1 addition & 1 deletion app/services/lesson_duration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def title

# rubocop:disable Style/RescueModifier
def average_duration
durations.reduce(0) { |sum, duration| sum + duration } / durations.size rescue 0
durations.sum / durations.size rescue 0
end
# rubocop:enable Style/RescueModifier

Expand Down
5 changes: 0 additions & 5 deletions spec/models/ability_spec.rb

This file was deleted.

2 changes: 0 additions & 2 deletions spec/spec_helper.rb

This file was deleted.

0 comments on commit 243438b

Please sign in to comment.