File LogView.rb
has 362 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "yast"
module Yast
class LogViewClass < Module
def main
Class LogViewClass
has 21 methods (exceeds 20 allowed). Consider refactoring. Open
class LogViewClass < Module
def main
Yast.import "UI"
textdomain "base"
Method CreateHelp
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def CreateHelp(logs, parameters)
parameters = deep_copy(parameters)
help = Ops.get_string(parameters, "help", "")
return help if help != "" && !help.nil?
- 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 Display
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
def Display(parameters)
parameters = deep_copy(parameters)
@param = deep_copy(parameters)
# menubutton
Method CreateWidget
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
def CreateWidget(parameters, log_files)
parameters = deep_copy(parameters)
log_files = deep_copy(log_files)
# logview caption
caption = Ops.get_locale(@param, "log_label", _("&Log"))
Method LogHandle
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
def LogHandle(_key, event)
event = deep_copy(event)
@param = CWM.GetProcessedWidget
LogViewCore.Update(Id(:_cwm_log))
ret = Ops.get(event, "ID")
Method GetMenuButtonWidget
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
def GetMenuButtonWidget(actions, save, mb_label)
actions = deep_copy(actions)
menubutton = []
if save
# menubutton entry
Method CreateHelp
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
def CreateHelp(logs, parameters)
parameters = deep_copy(parameters)
help = Ops.get_string(parameters, "help", "")
return help if help != "" && !help.nil?
Method Display
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def Display(parameters)
parameters = deep_copy(parameters)
@param = deep_copy(parameters)
# menubutton
- 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 GetMenuButtonWidget
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def GetMenuButtonWidget(actions, save, mb_label)
actions = deep_copy(actions)
menubutton = []
if save
# menubutton entry
- 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 LogHandle
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def LogHandle(_key, event)
event = deep_copy(event)
@param = CWM.GetProcessedWidget
LogViewCore.Update(Id(:_cwm_log))
ret = Ops.get(event, "ID")
- 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"