app/lib/authentication.rb
Authentication has 10 constants Open
Open
module Authentication
- Read upRead up
- Exclude checks
Too Many Constants
is a special case of LargeClass
.
Example
Given this configuration
TooManyConstants:
max_constants: 3
and this code:
class TooManyConstants
CONST_1 = :dummy
CONST_2 = :dummy
CONST_3 = :dummy
CONST_4 = :dummy
end
Reek would emit the following warning:
test.rb -- 1 warnings:
[1]:TooManyConstants has 4 constants (TooManyConstants)
Authentication::ModelClassMethods#secure_digest doesn't depend on instance state (maybe move it to another class?) Open
Open
def secure_digest(*args)
- Read upRead up
- Exclude checks
A Utility Function is any instance method that has no dependency on the state of the instance.