Showing 12 of 16 total issues
Method grouped_collection_select
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def grouped_collection_select(attribute, collection, group_method, group_label_method, option_key_method, option_value_method, options = {}, html_options = {})
Method inputs_collection
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def inputs_collection(attribute, collection, value_method, text_method, bootstrap, options = {})
Method collection_select
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def collection_select(attribute, collection, value_method, text_method, options = {}, html_options = {})
Method build_input_options
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def build_input_options(object, attribute, value_method, text_method, bootstrap, options)
Method collection_check_boxes
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def collection_check_boxes(attribute, collection, value_method, text_method, options = {}, html_options = {})
Method collection_radio_buttons
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def collection_radio_buttons(attribute, collection, value_method, text_method, options = {}, html_options = {})
Method associated_error_messages
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
def associated_error_messages(attribute)
error_messages = []
object.class.try(:reflections)&.each do |association_name, association|
next unless is_belongs_to_association?(association)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method build_floating_layout_content
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def build_floating_layout_content(attribute, bootstrap, label, help_text, &block)
Method field_wrapper_builder
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def field_wrapper_builder(attribute, bootstrap, options, html_options = nil, &block)
Method build_default_layout_content
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def build_default_layout_content(attribute, bootstrap, label, help_text, &block)
Method select
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def select(attribute, choices = nil, options = {}, html_options = {}, &block)
Method build_horizontal_layout_content
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def build_horizontal_layout_content(attribute, bootstrap, label, help_text, &block)