Showing 156 of 312 total issues
Method launch
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def launch(application, ruby_options: [], env_vars: {}, glimmer_options: {})
ruby_options_string = ruby_options.join(' ') + ' ' if ruby_options.any?
env_vars = env_vars.merge(glimmer_option_env_vars(glimmer_options))
load_env_vars(env_vars)
the_glimmer_lib = glimmer_lib
- 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_gui
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
def create_gui
window('Timer') {
margined true
group('Countdown') {
Consider simplifying this complex logical expression. Open
if ((
handle_custom_listener('on_key_event').empty? ||
(handle_custom_listener('on_key_event').any? && on_key_event_results.all? {|result| LibUI.boolean_to_integer(result) == 0})
) &&
(
Method launch
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def launch
window('Contacts', 600, 600) {
margined true
vertical_box {
- 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 launch
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def launch
window('Contacts', 600, 600) {
margined true
vertical_box {
- 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 launch
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def launch
window('Contacts', 600, 600) {
margined true
vertical_box {
- 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 launch
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def launch
window('Contacts', 600, 600) {
margined true
vertical_box {
- 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 launch
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
def launch
window('histogram example', 640, 480) {
margined true
horizontal_box {
Method interpret_color
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
def interpret_color(value)
if value.is_a?(Array) && value.last.is_a?(Hash)
options = value.last
value = value[0...-1]
end
Method launch
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
def launch
window('Michael Ende (1929-1995) The Neverending Story', 600, 400) {
margined true
area {
Method default_blocks
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
def default_blocks
case @letter
when :I
[
[block, block, block, block]
Method setup_timer
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
def setup_timer
unless @setup_timer
Glimmer::LibUI.timer(1) do
if @started
seconds = @sec_spinbox.value
Method custom_control_gem
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def custom_control_gem(custom_control_name, namespace)
gem_name = "glimmer-libui-cc-#{custom_control_name.underscore}"
gem_summary = "#{human_name(custom_control_name)} - Glimmer Custom Control"
if namespace
gem_name += "-#{namespace.underscore}"
- 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 method_missing
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def method_missing(method_name, *args, &block)
method_name_parameter = method_name.to_s.sub(/=$/, '').sub(/^set_/, '').to_sym
if self.class.parameters.include?(method_name_parameter)
method_name = method_name.to_s
parameter_index = self.class.parameters.index(method_name_parameter)
- 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 custom_shape_gem
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def custom_shape_gem(custom_shape_name, namespace)
gem_name = "glimmer-libui-cs-#{custom_shape_name.underscore}"
gem_summary = "#{human_name(custom_shape_name)} - Glimmer Custom Shape"
if namespace
gem_name += "-#{namespace.underscore}"
- 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 stroke
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def stroke(*args)
args = args.first if args.size == 1 && (args.first.is_a?(Array) || args.first.is_a?(Hash) || args.first.is_a?(String) || args.first.is_a?(Symbol))
if args.empty?
@stroke ||= {}
else
- 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 launch
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def launch
window('Michael Ende (1929-1995) The Neverending Story', 600, 500) {
margined true
vertical_box {
- 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 y
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def y(value = nil)
if value.nil?
@args.size > 3 ? @args[2] : (@options[:y] || 0)
else
if @args.size > 3
- 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 fill
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def fill(*args)
args = args.first if args.size == 1 && (args.first.is_a?(Array) || args.first.is_a?(Hash) || args.first.is_a?(String) || args.first.is_a?(Symbol))
if args.empty?
@fill ||= {}
else
- 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 launch
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def launch
window('Michael Ende (1929-1995) The Neverending Story', 600, 500) {
margined true
vertical_box {
- 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"