facebook pixelCodiga Analysis Ruby Rules
BACK TO LIST

Ruby rules

Codiga provides multiple sets of rules for 12+ languages. Below we provide a link and a description for all the rules supported by our platform. Note that not all the rules are being listed and described below.

Attribute

Design
Warning

Detect writable attributes

Learn more

BooleanParameter

Error prone
Warning

Detect boolean parameters (instead, the boolean should be used to call the function)

ClassVariable

Error prone
Warning

Do not use class variables

ControlParameter

Code style
Informational

Control Couple

DuplicateMethodCall

Best practice
Error

Duplicated method call

FeatureEnvy

Design
Warning

Use of a data from another class too much (data may be moved to another class)

InstanceVariableAssumption

Design
Warning

Assume too much on class content

IrresponsibleModule

Design
Error

No descriptive comment

LongParameterList

Best practice
Warning

Too many parameters

LongYieldList

Unknown
Informational

Yields too many parameters

ManualDispatch

Design
Error

manually dispatches method call

MissingSafeMethod

Best practice
Error

has missing safe method 'populate\_question\_options!'

ModuleInitialize

Unknown
Informational

has initialize method

NestedIterators

Error prone
Warning

contains iterators nested 4 deep

RepeatedConditional

Design
Warning

Repeated conditional

SubclassedFromCoreClass

Design
Warning

Inherit from Core Class

TooManyConstants

Code style
Informational

Too many constants

TooManyInstanceVariables

Error prone
Informational

Too many instance variables

TooManyMethods

Code style
Informational

Too many methods

TooManyStatements

Error prone
Informational

Too many statements

UncommunicativeMethodName

Error prone
Warning

has the name 'valid\_payment\_2'

UncommunicativeModuleName

Code style
Informational

Method name not descriptive

UncommunicativeParameterName

Error prone
Warning

Paramter not descriptive

UncommunicativeVariableName

Error prone
Warning

Variable name not descriptive

UnusedParameters

Error prone
Warning

Unused parameter

UtilityFunction

Design
Warning

Data does not depend on instance state