Class SlideShowClass
has 53 methods (exceeds 20 allowed). Consider refactoring. Open
class SlideShowClass < Module
include Yast::Logger
def main
Yast.import "UI"
File SlideShow.rb
has 426 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "yast"
require "yast2/system_time"
module Yast
class SlideShowClass < Module
Method Setup
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
def Setup(stages)
stages = deep_copy(stages)
log.info "SlideShow stages: #{stages}"
# initiliaze the generic counters
Reset()
Method Setup
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def Setup(stages)
stages = deep_copy(stages)
log.info "SlideShow stages: #{stages}"
# initiliaze the generic counters
Reset()
- 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 UpdateGlobalProgress
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def UpdateGlobalProgress(value, label)
value ||= @total_progress_value
label ||= @total_progress_label
if UI.WidgetExists(:progressTotal)
- 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 GenericHandleInput
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def GenericHandleInput
button = UI.PollInput
# in case of cancel ask user if he really wants to quit installation
if [:abort, :cancel].include?(button)
- 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 TableItem
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def TableItem(id, col1, col2, col3, col4)