fga-gpp-mds/2017.1-Escola-X

View on GitHub
app/controllers/users_controller.rb

Summary

Maintainability
A
0 mins
Test Coverage

Space inside parentheses detected.
Open

    if ( is_employee? )
Severity: Minor
Found in app/controllers/users_controller.rb by rubocop

Checks for spaces inside ordinary round parentheses.

Example:

# bad
f( 3)
g = (a + 3 )

# good
f(3)
g = (a + 3)

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

      redirect_to "/errors/error_500"
Severity: Minor
Found in app/controllers/users_controller.rb by rubocop

Checks if uses of quotes match the configured preference.

Example: EnforcedStyle: single_quotes (default)

# bad
"No special symbols"
"No string interpolation"
"Just text"

# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"

Example: EnforcedStyle: double_quotes

# bad
'Just some text'
'No special chars or interpolation'

# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"

Space inside parentheses detected.
Open

    if ( is_employee? )
Severity: Minor
Found in app/controllers/users_controller.rb by rubocop

Checks for spaces inside ordinary round parentheses.

Example:

# bad
f( 3)
g = (a + 3 )

# good
f(3)
g = (a + 3)

Don't use parentheses around the condition of an if.
Open

    if ( is_employee? )
Severity: Minor
Found in app/controllers/users_controller.rb by rubocop

This cop checks for the presence of superfluous parentheses around the condition of if/unless/while/until.

Example:

# bad
x += 1 while (x < 10)
foo unless (bar || baz)

if (x > 10)
elsif (x < 3)
end

# good
x += 1 while x < 10
foo unless bar || baz

if x > 10
elsif x < 3
end

Don't use parentheses around a method call.
Open

    if ( is_employee? )
Severity: Minor
Found in app/controllers/users_controller.rb by rubocop

This cop checks for redundant parentheses.

Example:

# bad
(x) if ((y.z).nil?)

# good
x if y.z.nil?

There are no issues that match your filters.

Category
Status