Xzanth/pugbot

View on GitHub
lib/pugbot/cinch/user.rb

Summary

Maintainability
A
0 mins
Test Coverage

Favor a normal unless-statement over a modifier clause in a multiline statement.
Open

      account = PugBot::Storage::User.first(nick: nick,
                                            authed: false) unless authed?
Severity: Minor
Found in lib/pugbot/cinch/user.rb by rubocop

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

      account = PugBot::Storage::User.create(authed: true,
                                             auth:   authname,
                                             nick:   authname) if authed?
Severity: Minor
Found in lib/pugbot/cinch/user.rb by rubocop

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

      account = PugBot::Storage::User.create(authed: false,
                                             nick:   nick) unless authed?
Severity: Minor
Found in lib/pugbot/cinch/user.rb by rubocop

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

There are no issues that match your filters.

Category
Status