mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Merge pull request #1378 from BelieveC/EnableDoubleNegation
Fixes #1374 to Enable Style/DoubleNegation Rubocop
This commit is contained in:
commit
4b418238d2
3 changed files with 7 additions and 8 deletions
|
|
@ -122,6 +122,10 @@ Style/TrailingBlankLines:
|
|||
Style/TrailingWhitespace:
|
||||
Enabled: true
|
||||
|
||||
# Checks for uses of double negation (!!) to convert something to a boolean value.
|
||||
Style/DoubleNegation:
|
||||
Enabled: true
|
||||
|
||||
AllCops:
|
||||
Include:
|
||||
- '**/Rakefile'
|
||||
|
|
|
|||
|
|
@ -246,11 +246,6 @@ Style/Documentation:
|
|||
Style/DotPosition:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 5
|
||||
Style/DoubleNegation:
|
||||
Exclude:
|
||||
- 'app/models/conference.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# Cop supports --auto-correct.
|
||||
Style/ElseAlignment:
|
||||
|
|
|
|||
|
|
@ -838,7 +838,7 @@ class Conference < ActiveRecord::Base
|
|||
# * +True+ -> If conference has a venue object.
|
||||
# * +False+ -> IF conference has no venue object.
|
||||
def venue_set?
|
||||
!!venue
|
||||
venue.present?
|
||||
end
|
||||
|
||||
##
|
||||
|
|
@ -848,7 +848,7 @@ class Conference < ActiveRecord::Base
|
|||
# * +True+ -> If conference has a cfp object.
|
||||
# * +False+ -> If conference has no cfp object.
|
||||
def cfp_set?
|
||||
!!program.cfp
|
||||
program.cfp.present?
|
||||
end
|
||||
|
||||
##
|
||||
|
|
@ -858,7 +858,7 @@ class Conference < ActiveRecord::Base
|
|||
# * +True+ -> If conference has a start and a end date.
|
||||
# * +False+ -> If conference has no start or end date.
|
||||
def registration_date_set?
|
||||
!!registration_period && !!registration_period.start_date && !!registration_period.end_date
|
||||
registration_period.present? && registration_period.start_date.present? && registration_period.end_date.present?
|
||||
end
|
||||
|
||||
# Calculates the distribution from events.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue