lib/pugbot/cinch/user.rb
Favor a normal unless-statement over a modifier clause in a multiline statement. Open
Open
account = PugBot::Storage::User.first(nick: nick,
authed: false) unless authed?
- Read upRead up
- Exclude checks
Checks for uses of if/unless modifiers with multiple-lines bodies.
Example:
# bad
{
result: 'this should not happen'
} unless cond
# good
{ result: 'ok' } if cond
Favor a normal if-statement over a modifier clause in a multiline statement. Open
Open
account = PugBot::Storage::User.create(authed: true,
auth: authname,
nick: authname) if authed?
- Read upRead up
- Exclude checks
Checks for uses of if/unless modifiers with multiple-lines bodies.
Example:
# bad
{
result: 'this should not happen'
} unless cond
# good
{ result: 'ok' } if cond
Favor a normal unless-statement over a modifier clause in a multiline statement. Open
Open
account = PugBot::Storage::User.create(authed: false,
nick: nick) unless authed?
- Read upRead up
- Exclude checks
Checks for uses of if/unless modifiers with multiple-lines bodies.
Example:
# bad
{
result: 'this should not happen'
} unless cond
# good
{ result: 'ok' } if cond