facebook pixelRuby Static Analysis Rules
BACK TO LIST

Ruby rules

Codiga provides multiple set 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
Medium

Detect writable attributes

Learn more

BooleanParameter

Error prone
Medium

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

ClassVariable

Error prone
Medium

Do not use class variables

ControlParameter

Code style
Minor

Control Couple

DataClump

Design
High

Data Clump

DuplicateMethodCall

Best practice
High

Duplicated method call

FeatureEnvy

Design
Medium

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

InstanceVariableAssumption

Design
Medium

Assume too much on class content

IrresponsibleModule

Design
High

No descriptive comment

LongParameterList

Best practice
Medium

Too many parameters

LongYieldList

Unknown
Minor

Yields too many parameters

ManualDispatch

Design
High

manually dispatches method call

MissingSafeMethod

Best practice
High

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

ModuleInitialize

Unknown
Minor

has initialize method

NestedIterators

Error prone
Medium

contains iterators nested 4 deep

RepeatedConditional

Design
Medium

Repeated conditional

SubclassedFromCoreClass

Design
Medium

Inherit from Core Class

TooManyConstants

Code style
Minor

Too many constants

TooManyInstanceVariables

Error prone
Minor

Too many instance variables

TooManyMethods

Code style
Minor

Too many methods

TooManyStatements

Error prone
Minor

Too many statements

UncommunicativeMethodName

Error prone
Medium

has the name 'valid\_payment\_2'

UncommunicativeModuleName

Code style
Minor

Method name not descriptive

UncommunicativeParameterName

Error prone
Medium

Paramter not descriptive

UncommunicativeVariableName

Error prone
Medium

Variable name not descriptive

UnusedParameters

Error prone
Medium

Unused parameter

UtilityFunction

Design
Medium

Data does not depend on instance state