config.rb
Assignment Branch Condition size for themes is too high. [28.02/15] Open
Open
def themes
data.themes.sort_by { |theme| [theme['type'], theme['shade'], theme['name']] }.map do |theme|
OpenStruct.new(theme.merge(
name: theme['name'],
shade: theme['shade'],
- 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
Favor a normal if-statement over a modifier clause in a multiline statement. Open
Open
activate :deploy do |deploy|
deploy.method = :git
end if ENV['ANALYTICS_ID']
- Read upRead up
- Exclude checks
Checks for uses of if/unless modifiers with multiple-lines bodies.
Example:
# bad
{
result: 'this should not happen'
} unless cond
# good
{ result: 'ok' } if cond