lib/sapristi/attribute_normalizer.rb
Assignment Branch Condition size for validate_percentage_field is too high. [16.31/15] Open
Open
def validate_percentage_field
min_percentage = { 'Height' => 0.05, 'Width' => 0.05 }.fetch(key, 0)
unless Definition::TRANSLATIONS.include? key
raise "#{key}=#{raw}, using percentage in invalid field, valid=#{Definition::TRANSLATIONS.keys.join(', ')}"
end
- Read upRead up
- Exclude checks
This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric
Line is too long. [120/80] Open
Open
raise Error, "#{key} percentage is invalid=#{raw}, valid=5%-100%" if percentage < min_percentage || percentage > 1
- Exclude checks
Line is too long. [115/80] Open
Open
raise "#{key}=#{raw}, using percentage in invalid field, valid=#{Definition::TRANSLATIONS.keys.join(', ')}"
- Exclude checks