Showing 806 of 967 total issues
Method TableRedraw
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def TableRedraw(descr, update_buttons)
descr = deep_copy(descr)
id_list = getIdList(descr)
@previous_selected_item = Ops.get(id_list, 0) if @previous_selected_item.nil?
entries = Builtins.maplist(id_list) do |opt_id|
Method updateOptionMap
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def updateOptionMap(opt_descr, fallbacks)
opt_descr = deep_copy(opt_descr)
fallbacks = deep_copy(fallbacks)
# ensure that the submaps exist
Ops.set(opt_descr, "table", Ops.get_map(opt_descr, "table", {}))
Method ShowText
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def ShowText(headline, text)
heading = if Builtins.size(headline) == 0
VSpacing(0.2)
else
Heading(headline)
Method FromBits
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def FromBits(bits)
return "" unless bits.between?(0, 32)
b = Ops.divide(bits, 8)
d = Ops.modulo(bits, 8)
Method main
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def main
Yast.import "UI"
Yast.import "GPG"
Yast.import "GPGWidgets"
Method BackAbortInstallationNextButtonBox
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def BackAbortInstallationNextButtonBox
HBox(
HWeight(
1,
ReplacePoint(
Method prepareVendorDeviceInfo
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def prepareVendorDeviceInfo(controller)
controller = deep_copy(controller)
# build up vendor/device information
# if vendor not given, try sub_vendor
Method BackAbortNextButtonBox
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def BackAbortNextButtonBox
HBox(
HWeight(
1,
ReplacePoint(
Method RemoveServiceSupportFromZone
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def RemoveServiceSupportFromZone(service, zone)
Yast.import "SuSEFirewallServices" # lazy import due to circular dependencies
needed = SuSEFirewallServices.GetNeededPortsAndProtocols(service)
# unknown service
Method SetLoggingSettings
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def SetLoggingSettings(rule, state)
SetModified()
case rule
when "ACCEPT"
Method HaveService
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def HaveService(service, protocol, interface)
if !IsSupportedProtocol(protocol)
Builtins.y2error("Unknown protocol: %1", protocol)
return nil
end
Method ChangeLineField
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def ChangeLineField(file, line, field, entry)
Builtins.y2debug("line %1 field %2 entry %3", line, field, entry)
changed = false
if !Builtins.haskey(Ops.get_map(file.value, "l", {}), line)
Ops.set(file.value, ["l", line], {})
Method anyTimedMessageTypeInternal
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def anyTimedMessageTypeInternal(headline, message, timeout, richtext, width, height)
button_box = ButtonBox(
# FIXME: BNC #422612, Use `opt(`noSanityCheck) later
PushButton(Id(:stop), Opt(:cancelButton), Label.StopButton),
PushButton(Id(:ok_msg), Opt(:default, :okButton), Label.OKButton)
Method start_journal?
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def start_journal?
case file_state(selected_filename)
when :ok
false
when :empty
Method main
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def main
textdomain "base"
# the command line description map
return CommandLine.Run("id" => "view_anymsg") if WFM.Args.first == "help"
Method Import
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def Import(devregex, devices)
devices = deep_copy(devices)
devs = FilterNOT(@Devices, devregex)
Builtins.y2debug("Devs=%1", devs)
Method IsBroadcastAllowed
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def IsBroadcastAllowed(needed_ports, zone)
needed_ports = deep_copy(needed_ports)
if Builtins.size(needed_ports) == 0
Builtins.y2warning("Unknown service with no needed ports!")
return nil
Method RunSimpleErrorPopup
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def RunSimpleErrorPopup(heading, description_text, dont_show_dialog_ident, dont_show_dialog_param)
UI.OpenDialog(
Opt(:decorated),
VBox(
# dialog heading - displayed in a big bold font
Method ProgressProgress
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def ProgressProgress(id, val_raw, val_percent)
Builtins.y2debug("ProgressProgress: %1, %2%% ", id, val_percent)
if Mode.commandline
if @tick_progress
Method updateButtons
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def updateButtons(descr, opt_descr)
descr = deep_copy(descr)
opt_descr = deep_copy(opt_descr)
if Ops.get_boolean(descr, ["_cwm_attrib", "add_delete_buttons"], true)
UI.ChangeWidget(