Showing 45 of 45 total issues
PrincipalController tests '( is_principal? )' at least 3 times Open
if ( is_principal? ) @principal = Employee.find(params[:id]) end end
- Read upRead up
- Exclude checks
PrincipalController assumes too much for instance variable '@principal' Open
class PrincipalController < ApplicationController
- Read upRead up
- Exclude checks
PrincipalController has no descriptive comment Open
class PrincipalController < ApplicationController
- Read upRead up
- Exclude checks
Tab detected. Open
:name,
- Exclude checks
Don't use parentheses around the condition of an if
. Open
if ( is_principal? )
- Read upRead up
- Exclude checks
Space inside parentheses detected. Open
if ( @principal.update(principal_params) )
- Read upRead up
- Exclude checks
Use a guard clause instead of wrapping the code inside a conditional expression. Open
if ( is_principal? )
- Read upRead up
- Exclude checks
Space inside parentheses detected. Open
if ( @principal.update(principal_params) )
- Read upRead up
- Exclude checks
Tab detected. Open
:password,
- Exclude checks
Align the parameters of a method call if they span more than one line. Open
:name,
- Read upRead up
- Exclude checks
Don't use parentheses around the condition of an if
. Open
if ( @principal.update(principal_params) )
- Read upRead up
- Exclude checks
Tab detected. Open
:phone,
- Exclude checks
Don't use parentheses around the condition of an if
. Open
if ( is_principal? )
- Read upRead up
- Exclude checks
Tab detected. Open
:admission_date,
- Exclude checks
Align the parameters of a method call if they span more than one line. Open
:employee_cpf,
- Read upRead up
- Exclude checks
Tab detected. Open
:gender,
- Exclude checks
Missing top-level class documentation comment. Open
class PrincipalController < ApplicationController
- Read upRead up
- Exclude checks
Tab detected. Open
:employee_cpf,
- Exclude checks
Align the parameters of a method call if they span more than one line. Open
:phone,
- Read upRead up
- Exclude checks
Align the parameters of a method call if they span more than one line. Open
:gender,
- Read upRead up
- Exclude checks
Tab detected. Open
end
- Exclude checks
Use a guard clause instead of wrapping the code inside a conditional expression. Open
if ( is_principal? )
- Read upRead up
- Exclude checks
Align the parameters of a method call if they span more than one line. Open
:password,
- Read upRead up
- Exclude checks
Align the parameters of a method call if they span more than one line. Open
:birth_date)
- Read upRead up
- Exclude checks
Use a guard clause instead of wrapping the code inside a conditional expression. Open
if ( is_principal? )
- Read upRead up
- Exclude checks
Don't use parentheses around the condition of an if
. Open
if ( is_principal? )
- Read upRead up
- Exclude checks
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
flash[:notice] = "Diretor(a) alterado(a) com sucesso"
- Read upRead up
- Exclude checks
Favor modifier if
usage when having a single-line body. Another good alternative is the usage of control flow &&
/||
. Open
if ( is_principal? )
- Read upRead up
- Exclude checks
Don't use parentheses around a method call. Open
if ( @principal.update(principal_params) )
- Read upRead up
- Exclude checks
Align the parameters of a method call if they span more than one line. Open
:admission_date,
- Read upRead up
- Exclude checks
Tab detected. Open
:birth_date)
- Exclude checks
Favor modifier if
usage when having a single-line body. Another good alternative is the usage of control flow &&
/||
. Open
if ( is_principal? )
- Read upRead up
- Exclude checks