Showing 13 of 15 total issues
Class ArgumentBuilder
has 37 methods (exceeds 20 allowed). Consider refactoring. Open
class ArgumentBuilder < BaseArgumentBuilder
def method_argument_name
name if has_input_value? && !helper_argument?
end
Class UserDefinedBuilder
has 28 methods (exceeds 20 allowed). Consider refactoring. Open
class UserDefinedBuilder < ObjectBuilder
def initialize(info)
@info = info
end
Class Value
has 28 methods (exceeds 20 allowed). Consider refactoring. Open
class Value
setup_instance_method! :init
METHOD_MAP = {
TYPE_INVALID => [:get_none, :set_none],
Class IObjectInfo
has 24 methods (exceeds 20 allowed). Consider refactoring. Open
class IObjectInfo < IRegisteredTypeInfo
def type_name
Lib.g_object_info_get_type_name self
end
Class CallbackArgumentBuilder
has 23 methods (exceeds 20 allowed). Consider refactoring. Open
class CallbackArgumentBuilder < BaseArgumentBuilder
def method_argument_name
@method_argument_name ||= name || new_variable
end
Class ObjectBuilder
has 21 methods (exceeds 20 allowed). Consider refactoring. Open
class ObjectBuilder < RegisteredTypeBuilder
include WithLayout
# Dummy builder for the ObjectBase class
class ObjectBaseBuilder
Method modul
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def modul
unless defined? @module
build_dependencies
instantiate_module
setup_lib_for_ffi unless lib_already_set_up
- 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 signal_connect
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def self.signal_connect(object, detailed_signal, data = nil, after = false, &block)
Method marshaller
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def self.marshaller(closure, return_value, param_values, _invocation_hint,
_marshal_data)
Method set_up_destroy_notifier_relations
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def set_up_destroy_notifier_relations
@base_argument_builders.each do |bldr|
if (idx = bldr.destroy_idx) >= 0
target = @base_argument_builders[idx]
if target.specialized_type_tag == :callback &&
- 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 conversion
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def conversion
case @type_info.flattened_tag
when :utf8, :filename
if @ownership_transfer == :everything
"GirFFI::AllocationHelper.free_after #{@argument}, &:to_utf8"
- 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 set_up_user_data_relations
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def set_up_user_data_relations
@base_argument_builders.each do |bldr|
if (idx = bldr.closure_idx) >= 0
target_bldr = @base_argument_builders[idx]
unless target_bldr.specialized_type_tag == :void
- 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 create_for
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def self.create_for path
stage = PhotoWall.new
stage.instance_eval do
@path = path
- 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"