Assignment Branch Condition size for perform is too high. [16.52/15] Open
def perform(upload_item_id)
item = UploadItem.find(upload_item_id)
upload = item.upload
options = item.options
- 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
Method has too many lines. [11/10] Open
def perform(upload_item_id)
item = UploadItem.find(upload_item_id)
upload = item.upload
options = item.options
- Read upRead up
- Exclude checks
This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Complex method Spree::ImportInventoryItemWorker#perform (20.7) Open
def perform(upload_item_id)
item = UploadItem.find(upload_item_id)
upload = item.upload
options = item.options
- Read upRead up
- Exclude checks
Flog calculates the ABC score for methods. The ABC score is based on assignments, branches (method calls), and conditions.
You can read more about ABC metrics or the flog tool
Line is too long. [161/150] Open
raise Spree::ImportError, I18n.t('workers.spree.import_inventory_item_worker.unsupported_variant_provider', product_type: product_type, provider: provider)
- Read upRead up
- Exclude checks
This cop checks the length of lines in the source code.
The maximum length is configurable.
The tab size is configured in the IndentationWidth
of the Layout/Tab
cop.
Align the parameters of a method call if they span more than one line. Open
index: item.index,
messages: error_message))
- Read upRead up
- Exclude checks
Here we check if the parameters on a multi-line method call or definition are aligned.
Example: EnforcedStyle: withfirstparameter (default)
# good
foo :bar,
:baz
# bad
foo :bar,
:baz
Example: EnforcedStyle: withfixedindentation
# good
foo :bar,
:baz
# bad
foo :bar,
:baz