yast/yast-yast2

View on GitHub

Showing 806 of 967 total issues

Method startController has 56 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    def startController(controller)
      controller = deep_copy(controller)
      # check module information
      # skip controller if no module info available

Severity: Major
Found in library/system/src/modules/Hotplug.rb - About 2 hrs to fix

    Method IsServiceSupportedInZone has 56 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        def IsServiceSupportedInZone(service, zone)
          return nil if !IsKnownZone(zone)
    
          Yast.import "SuSEFirewallServices" # lazy import due to circular dependencies
    
    
    Severity: Major
    Found in library/network/src/lib/network/susefirewall2.rb - About 2 hrs to fix

      File GPG.rb has 259 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      require "yast"
      require "shellwords"
      
      module Yast
        class GPGClass < Module
      Severity: Minor
      Found in library/gpg/src/modules/GPG.rb - About 2 hrs to fix

        File Service.rb has 259 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        require "yast"
        require "yast2/systemd/service"
        
        module Yast
          class ServiceClass < Module
        Severity: Minor
        Found in library/systemd/src/modules/Service.rb - About 2 hrs to fix

          Method askForNewOption has 55 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              def askForNewOption(possible, editable, descr)
                possible = deep_copy(possible)
                descr = deep_copy(descr)
                do_sort = !Ops.get_boolean(descr, "add_items_keep_order", false)
                possible = Builtins.sort(possible) if do_sort
          Severity: Major
          Found in library/cwm/src/modules/TablePopup.rb - About 2 hrs to fix

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

                def main
                  textdomain "base"
            
                  Yast.import "Misc"
                  Yast.import "Mode"
            Severity: Major
            Found in library/control/src/modules/ProductFeatures.rb - About 2 hrs to fix

              Method ConfirmAbort has 55 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  def ConfirmAbort(severity)
                    what_will_happen = ""
              
                    # Confirm user request to abort installation
                    abort_label = _("Really abort the installation?")
              Severity: Major
              Found in library/general/src/modules/Popup.rb - About 2 hrs to fix

                File Package.rb has 257 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                require "yast"
                require "forwardable"
                require "y2packager/resolvable"
                
                Yast.import "CommandLine"
                Severity: Minor
                Found in library/packages/src/modules/Package.rb - About 2 hrs to fix

                  Class LogViewClass has 21 methods (exceeds 20 allowed). Consider refactoring.
                  Open

                    class LogViewClass < Module
                      def main
                        Yast.import "UI"
                        textdomain "base"
                  
                  
                  Severity: Minor
                  Found in library/log/src/modules/LogView.rb - About 2 hrs to fix

                    Class Product has 21 methods (exceeds 20 allowed). Consider refactoring.
                    Open

                      class Product
                        include Yast::Logger
                        include ProductLicenseMixin
                    
                        # @return [String] Name
                    Severity: Minor
                    Found in library/packages/src/lib/y2packager/product.rb - About 2 hrs to fix

                      Class ServiceWidget has 21 methods (exceeds 20 allowed). Consider refactoring.
                      Open

                        class ServiceWidget
                          extend Yast::I18n
                          include Yast::I18n
                          include Yast::Logger
                          include Yast::UIShortcuts
                      Severity: Minor
                      Found in library/systemd/src/lib/yast2/service_widget.rb - About 2 hrs to fix

                        Class MultiFileConfig has 21 methods (exceeds 20 allowed). Consider refactoring.
                        Open

                          class MultiFileConfig
                            include Yast::Logger
                        
                            class << self
                              # Instantiates and loads configuration
                        Severity: Minor
                        Found in library/general/src/lib/cfa/multi_file_config.rb - About 2 hrs to fix

                          Method Replaceworkflows has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              def Replaceworkflows(workflows)
                                workflows = deep_copy(workflows)
                                workflows = PrepareWorkflows(workflows)
                          
                                # This function doesn't update the current workflow but replaces it.
                          Severity: Major
                          Found in library/control/src/modules/WorkflowManager.rb - About 2 hrs to fix

                            Method getMatchingProposal has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                def getMatchingProposal(stage, mode, proptype)
                                  Builtins.y2milestone(
                                    "Stage: %1 Mode: %2, Type: %3",
                                    stage,
                                    mode,
                            Severity: Major
                            Found in library/control/src/modules/ProductControl.rb - About 2 hrs to fix

                              Method GetMessages has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  def GetMessages(warnings, errors, messages, yes_no)
                                    richtext = ""
                              
                                    if warnings
                                      # translators: warnings summary header
                              Severity: Major
                              Found in library/general/src/modules/Report.rb - About 2 hrs to fix

                                Method ShowNcursesHelp has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    def ShowNcursesHelp
                                      # NCurses (textmode) Control Center headline
                                      headline = _("Controlling YaST ncurses with the Keyboard")
                                
                                      # NCurses Control Center help 1/
                                Severity: Major
                                Found in library/desktop/src/clients/menu.rb - About 2 hrs to fix

                                  File CWMTab.rb has 256 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  require "yast"
                                  
                                  module Yast
                                    class CWMTabClass < Module
                                      def main
                                  Severity: Minor
                                  Found in library/cwm/src/modules/CWMTab.rb - About 2 hrs to fix

                                    Method Connect has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        def Connect(show_continue_button)
                                          # we already have a lock
                                          return { "connected" => @have_lock, "aborted" => @aborted } if !@have_lock.nil?
                                    
                                          try_again = true
                                    Severity: Major
                                    Found in library/packages/src/modules/PackageLock.rb - About 2 hrs to fix

                                      Method RunHWDialog has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          def RunHWDialog(settings)
                                            settings = deep_copy(settings)
                                            # reinitialize internal variables
                                            @current_items = []
                                            @descriptions = {}
                                      Severity: Major
                                      Found in library/cwm/src/modules/WizardHW.rb - About 2 hrs to fix

                                        Method anyMessageDetailsInternalType has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            def anyMessageDetailsInternalType(headline, message, details, richtext, width, height)
                                              button_box = ButtonBox(
                                                PushButton(Id(:ok_msg), Opt(:default, :okButton), Label.OKButton),
                                                # FIXME: BNC #422612, Use `opt(`noSanityCheck) later
                                                # button label
                                        Severity: Major
                                        Found in library/general/src/modules/Popup.rb - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language