yast/yast-yast2

View on GitHub

Showing 806 of 967 total issues

Method DisplayHelpMsg has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    def DisplayHelpMsg(headline, helptext, color, vdim)
      helptext = deep_copy(helptext)
      dia_opt = Opt(:decorated)

      case color
Severity: Minor
Found in library/packages/src/modules/PackagesUI.rb - About 1 hr to fix

    Method layout_popup has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        def layout_popup(message, button_box, info_on)
          vertical_size = info_on ? 10 : 1
          VBox(
            HSpacing(50), # enforce width
            VSpacing(0.1),
    Severity: Minor
    Found in library/packages/src/modules/PackageCallbacks.rb - About 1 hr to fix

      Method run has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          def run
            textdomain "example"
      
            service = ::Yast2::SystemService.find("cups.service")
            service_widget = ::CWM::ServiceWidget.new(service)
      Severity: Minor
      Found in library/cwm/examples/service_widget_old_cwm.rb - About 1 hr to fix

        Method StartPackage has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            def StartPackage(name, _location, _summary, installsize, is_delete)
              return if !@enable_asterix_package
        
              @_package_name = name
              @_package_size = installsize
        Severity: Minor
        Found in library/packages/src/modules/PackageCallbacks.rb - About 1 hr to fix

          Method ProcessStart has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              def ProcessStart(task, stages, help)
                stages = deep_copy(stages)
                Builtins.y2milestone(
                  "Process: Start: task: %1, stages: %2, help: %3",
                  task,
          Severity: Minor
          Found in library/packages/src/modules/PackageCallbacks.rb - About 1 hr to fix

            Method cd_devices has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                def cd_devices(preferred)
                  cds = Convert.convert(
                    SCR.Read(path(".probe.cdrom")),
                    from: "any",
                    to:   "list <map>"
            Severity: Minor
            Found in library/packages/src/modules/PackageCallbacks.rb - About 1 hr to fix

              Method PrepareProposals has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  def PrepareProposals(proposals)
                    proposals = deep_copy(proposals)
                    new_proposals = []
              
                    # Going through all proposals
              Severity: Minor
              Found in library/control/src/modules/WorkflowManager.rb - About 1 hr to fix

                Method anyMessageInternalType has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    def anyMessageInternalType(headline, message, richtext, width, height)
                      button_box = ButtonBox(
                        PushButton(
                          Id(:ok_msg),
                          Opt(:default, :key_F10, :okButton),
                Severity: Minor
                Found in library/general/src/modules/Popup.rb - About 1 hr to fix

                  Method GetShowQuestionAgain has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      def GetShowQuestionAgain(params)
                        params = deep_copy(params)
                        LazyLoadCurrentConf()
                        q_type = Ops.get(params, "q_type")
                  
                  
                  Severity: Minor
                  Found in library/general/src/modules/DontShowAgain.rb - About 1 hr to fix

                    Method GenericDialog has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        def GenericDialog(button_box)
                          button_box = deep_copy(button_box)
                          VBox(
                            Id(:WizardDialog),
                            ReplacePoint(Id(:topmenu), Empty()),
                    Severity: Minor
                    Found in library/wizard/src/modules/Wizard.rb - About 1 hr to fix

                      Method GUI has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          def GUI(text, buttons)
                            buttons = deep_copy(buttons)
                            i = 0
                            t = HBox()
                            buttons_map = {
                      Severity: Minor
                      Found in library/sequencer/doc/examples/examples.rb - About 1 hr to fix

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

                            def main
                              Yast.import "Pkg"
                        
                              Yast.import "Arch"
                              Yast.import "Mode"
                        Severity: Minor
                        Found in library/system/src/modules/Kernel.rb - About 1 hr to fix

                          Method AddInterfaceIntoZone has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              def AddInterfaceIntoZone(interface, zone)
                                SetModified()
                          
                                current_zone = GetZoneOfInterface(interface)
                          
                          
                          Severity: Minor
                          Found in library/network/src/lib/network/susefirewall2.rb - About 1 hr to fix

                            Method GetCachedWorkflowFilename has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                def GetCachedWorkflowFilename(type, src_id, name = "")
                                  if ![:package, :addon].include?(type)
                                    Builtins.y2error("Unknown workflow type: %1", type)
                                    return nil
                                  end
                            Severity: Minor
                            Found in library/control/src/modules/WorkflowManager.rb - About 1 hr to fix

                              Method Command has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  def Command
                                    # if we are done already, return the result
                                    return { "command" => @aborted ? "abort" : "exit" } if @done
                              
                                    # there is a command in the cache
                              Severity: Minor
                              Found in library/commandline/src/modules/CommandLine.rb - About 1 hr to fix

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

                                    def main
                                      textdomain "base"
                                
                                      Yast.import "Mode"
                                      Yast.import "Summary"
                                Severity: Minor
                                Found in library/general/src/modules/Report.rb - About 1 hr to fix

                                  Method LongText has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      def LongText(headline, richtext, hdim, vdim)
                                        richtext = deep_copy(richtext)
                                        success = UI.OpenDialog(
                                          Opt(:decorated),
                                          HBox(
                                  Severity: Minor
                                  Found in library/general/src/modules/Popup.rb - About 1 hr to fix

                                    Method SetDefaultReturn has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        def SetDefaultReturn(params, default_return)
                                          params = deep_copy(params)
                                          default_return = deep_copy(default_return)
                                          LazyLoadCurrentConf()
                                          q_type = Ops.get(params, "q_type")
                                    Severity: Minor
                                    Found in library/general/src/modules/DontShowAgain.rb - About 1 hr to fix

                                      Method ReadInstallInf has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          def ReadInstallInf
                                            return if !@install_inf.nil?
                                      
                                            # skip from chroot
                                            old_SCR = WFM.SCRGetDefault
                                      Severity: Minor
                                      Found in library/general/src/modules/Linuxrc.rb - About 1 hr to fix

                                        Method ProgressStart has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                        Open

                                            def ProgressStart(id, task, in_percent, is_alive, _min, _max, _val_raw, val_percent)
                                        Severity: Major
                                        Found in library/packages/src/modules/PackageCallbacks.rb - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language