yast/yast-yast2

View on GitHub

Showing 806 of 967 total issues

Method TableRedraw has 31 lines of code (exceeds 25 allowed). Consider refactoring.
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|
Severity: Minor
Found in library/cwm/src/modules/TablePopup.rb - About 1 hr to fix

    Method updateOptionMap has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    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", {}))
    Severity: Minor
    Found in library/cwm/src/modules/TablePopup.rb - About 1 hr to fix

      Method ShowText has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          def ShowText(headline, text)
            heading = if Builtins.size(headline) == 0
              VSpacing(0.2)
            else
              Heading(headline)
      Severity: Minor
      Found in library/general/src/modules/Popup.rb - About 1 hr to fix

        Method FromBits has 31 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            def FromBits(bits)
              return "" unless bits.between?(0, 32)
        
              b = Ops.divide(bits, 8)
              d = Ops.modulo(bits, 8)
        Severity: Minor
        Found in library/types/src/modules/Netmask.rb - About 1 hr to fix

          Method main has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              def main
                Yast.import "UI"
          
                Yast.import "GPG"
                Yast.import "GPGWidgets"
          Severity: Minor
          Found in library/gpg/doc/example.rb - About 1 hr to fix

            Method BackAbortInstallationNextButtonBox has 30 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                def BackAbortInstallationNextButtonBox
                  HBox(
                    HWeight(
                      1,
                      ReplacePoint(
            Severity: Minor
            Found in library/wizard/src/modules/Wizard.rb - About 1 hr to fix

              Method prepareVendorDeviceInfo has 30 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  def prepareVendorDeviceInfo(controller)
                    controller = deep_copy(controller)
                    # build up vendor/device information
              
                    # if vendor not given, try sub_vendor
              Severity: Minor
              Found in library/system/src/modules/ModuleLoading.rb - About 1 hr to fix

                Method BackAbortNextButtonBox has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    def BackAbortNextButtonBox
                      HBox(
                        HWeight(
                          1,
                          ReplacePoint(
                Severity: Minor
                Found in library/wizard/src/modules/Wizard.rb - About 1 hr to fix

                  Method RemoveServiceSupportFromZone has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      def RemoveServiceSupportFromZone(service, zone)
                        Yast.import "SuSEFirewallServices" # lazy import due to circular dependencies
                  
                        needed = SuSEFirewallServices.GetNeededPortsAndProtocols(service)
                        # unknown service
                  Severity: Minor
                  Found in library/network/src/lib/network/susefirewall2.rb - About 1 hr to fix

                    Method SetLoggingSettings has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        def SetLoggingSettings(rule, state)
                          SetModified()
                    
                          case rule
                          when "ACCEPT"
                    Severity: Minor
                    Found in library/network/src/lib/network/susefirewall2.rb - About 1 hr to fix

                      Method HaveService has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          def HaveService(service, protocol, interface)
                            if !IsSupportedProtocol(protocol)
                              Builtins.y2error("Unknown protocol: %1", protocol)
                              return nil
                            end
                      Severity: Minor
                      Found in library/network/src/lib/network/susefirewall.rb - About 1 hr to fix

                        Method ChangeLineField has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                        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], {})
                        Severity: Minor
                        Found in library/general/src/modules/AsciiFile.rb - About 1 hr to fix

                          Method anyTimedMessageTypeInternal has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                          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)
                          Severity: Minor
                          Found in library/general/src/modules/Popup.rb - About 1 hr to fix

                            Method start_journal? has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                def start_journal?
                                  case file_state(selected_filename)
                                  when :ok
                                    false
                                  when :empty
                            Severity: Minor
                            Found in library/system/src/lib/yast2/clients/view_anymsg.rb - About 1 hr to fix

                              Method main has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  def main
                                    textdomain "base"
                              
                                    # the command line description map
                                    return CommandLine.Run("id" => "view_anymsg") if WFM.Args.first == "help"
                              Severity: Minor
                              Found in library/system/src/lib/yast2/clients/view_anymsg.rb - About 1 hr to fix

                                Method Import has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    def Import(devregex, devices)
                                      devices = deep_copy(devices)
                                      devs = FilterNOT(@Devices, devregex)
                                      Builtins.y2debug("Devs=%1", devs)
                                
                                
                                Severity: Minor
                                Found in library/network/src/modules/NetworkInterfaces.rb - About 1 hr to fix

                                  Method IsBroadcastAllowed has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                  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
                                  Severity: Minor
                                  Found in library/network/src/lib/network/susefirewall2.rb - About 1 hr to fix

                                    Method RunSimpleErrorPopup has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                    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
                                    Severity: Minor
                                    Found in library/packages/src/modules/SignatureCheckDialogs.rb - About 1 hr to fix

                                      Method ProgressProgress has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          def ProgressProgress(id, val_raw, val_percent)
                                            Builtins.y2debug("ProgressProgress: %1, %2%% ", id, val_percent)
                                      
                                            if Mode.commandline
                                              if @tick_progress
                                      Severity: Minor
                                      Found in library/packages/src/modules/PackageCallbacks.rb - About 1 hr to fix

                                        Method updateButtons has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                        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(
                                        Severity: Minor
                                        Found in library/cwm/src/modules/TablePopup.rb - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language