yast/yast-yast2

View on GitHub

Showing 806 of 967 total issues

Method Read has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    def Read
      # Do not read it again and again
      # to avoid rewriting changes already made
      if @configuration_has_been_read
        Builtins.y2milestone(
Severity: Minor
Found in library/network/src/lib/network/susefirewall2.rb - About 1 hr to fix

    Method RemoveService has 47 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        def RemoveService(service, protocol, interface)
          Builtins.y2milestone(
            "Removing service %1, protocol %2 from %3",
            service,
            protocol,
    Severity: Minor
    Found in library/network/src/lib/network/susefirewall.rb - About 1 hr to fix

      Method GPGKeyAsTerm has 47 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          def GPGKeyAsTerm(key)
            key = deep_copy(key)
            rt = Ops.add(
              # GPG key property
              Builtins.sformat(
      Severity: Minor
      Found in library/packages/src/modules/SignatureCheckDialogs.rb - About 1 hr to fix

        Method SourceProbeError has 47 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            def SourceProbeError(url, error, description)
              Builtins.y2milestone(
                "Source probe: error: url: %1, error: %2, description: %3",
                URL.HidePassword(url),
                error,
        Severity: Minor
        Found in library/packages/src/modules/PackageCallbacks.rb - About 1 hr to fix

          Method SetServicesForZones has 46 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              def SetServicesForZones(services_ids, firewall_zones, new_status)
                Yast.import "SuSEFirewallServices"
          
                services_ids = deep_copy(services_ids)
                zones = deep_copy(firewall_zones)
          Severity: Minor
          Found in library/network/src/lib/network/susefirewalld.rb - About 1 hr to fix

            Method UseCorruptedItem has 46 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                def UseCorruptedItem(item_type, item_name, key, repository)
                  key = deep_copy(key)
                  repo = Pkg.SourceGeneralData(repository)
            
                  description_text = Builtins.sformat(
            Severity: Minor
            Found in library/packages/src/modules/SignatureCheckDialogs.rb - About 1 hr to fix

              Method MergeWorkflow has 46 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  def MergeWorkflow(base, addon, _prod_name, domain)
                    base = deep_copy(base)
                    addon = deep_copy(addon)
              
                    log.info "merging workflow #{addon.inspect} to #{base.inspect}"
              Severity: Minor
              Found in library/control/src/modules/WorkflowManager.rb - About 1 hr to fix

                Method SaveInstallInf has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    def SaveInstallInf(root)
                      if Stage.initial && !Mode.test
                        inst_if_file = "/etc/install.inf"
                
                        if !root.nil? && root != "" && root != "/"
                Severity: Minor
                Found in library/general/src/modules/Linuxrc.rb - About 1 hr to fix

                  Method Rich2Plain has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      def Rich2Plain(richtext)
                        Builtins.y2debug("richtext=%1", richtext)
                  
                        lparts = Builtins.splitstring(DropWS(richtext), "<")
                        Builtins.y2debug("lparts=%1", lparts)
                  Severity: Minor
                  Found in library/types/src/modules/RichText.rb - About 1 hr to fix

                    Method initialize has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        def initialize
                          super
                    
                          textdomain "base"
                    
                    
                    Severity: Minor
                    Found in library/network/src/lib/network/susefirewalld.rb - About 1 hr to fix

                      Method RemovePortFromPortRanges has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          def RemovePortFromPortRanges(port_number, port_ranges)
                            port_ranges = deep_copy(port_ranges)
                            # Checking necessarity of filtering and params
                            return deep_copy(port_ranges) if port_ranges.nil? || port_ranges == []
                            return deep_copy(port_ranges) if port_number.nil? || port_number == 0
                      Severity: Minor
                      Found in library/network/src/modules/PortRanges.rb - About 1 hr to fix

                        Method GPGKeyAsString has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            def GPGKeyAsString(key)
                              key = deep_copy(key)
                              # Part of the GnuPG key description in popup, %1 is a GnuPG key ID
                              Ops.add(
                                Ops.add(
                        Severity: Minor
                        Found in library/packages/src/modules/SignatureCheckDialogs.rb - About 1 hr to fix

                          Method SourceCreateError has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              def SourceCreateError(url, error, description)
                                Builtins.y2milestone(
                                  "Source create: error: url: %1, error: %2, description: %3",
                                  URL.HidePassword(url),
                                  error,
                          Severity: Minor
                          Found in library/packages/src/modules/PackageCallbacks.rb - About 1 hr to fix

                            Method ReadControlFile has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                def ReadControlFile(controlfile)
                                  begin
                                    @productControl = XML.XMLToYCPFile(controlfile)
                                  rescue RuntimeError => e
                                    log.error "Failed to read control file: #{e.inspect}"
                            Severity: Minor
                            Found in library/control/src/modules/ProductControl.rb - About 1 hr to fix

                              Method UpdateWorkflows has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  def UpdateWorkflows(workflows, prod_name, domain)
                                    workflows = deep_copy(workflows)
                                    Builtins.foreach(workflows) do |workflow|
                                      stage = Ops.get_string(workflow, "stage", "")
                                      mode = Ops.get_string(workflow, "mode", "")
                              Severity: Minor
                              Found in library/control/src/modules/WorkflowManager.rb - About 1 hr to fix

                                Method popupLayoutInternalTypeWithLabel has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    def popupLayoutInternalTypeWithLabel(headline, message, button_box, label, richtext, width, height)
                                      button_box = deep_copy(button_box)
                                      rt = VWeight(
                                        1,
                                        VBox(
                                Severity: Minor
                                Found in library/general/src/modules/Popup.rb - About 1 hr to fix

                                  Method AddModule has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      def AddModule(modname, modargs)
                                        log.warn "Initrd.AddModule() is deprecated, do not use (sysconfig.kernel.INITRD_MODULES " \
                                                 "is not written anymore, see bnc#895084)"
                                  
                                        if Stage.initial && Builtins.size(@modules) == 0
                                  Severity: Minor
                                  Found in library/system/src/modules/Initrd.rb - About 1 hr to fix

                                    Method ProgressStart has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        def ProgressStart(id, task, in_percent, is_alive, _min, _max, _val_raw, val_percent)
                                          Builtins.y2milestone("ProgressStart: %1", id)
                                    
                                          @tick_progress = is_alive
                                          @val_progress = !in_percent && !is_alive
                                    Severity: Minor
                                    Found in library/packages/src/modules/PackageCallbacks.rb - About 1 hr to fix

                                      Method SourceReportError has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          def SourceReportError(source_id, url, error, description)
                                            Builtins.y2milestone(
                                              "Source report: error: id: %1, url: %2, error: %3, description: %4",
                                              source_id,
                                              URL.HidePassword(url),
                                      Severity: Minor
                                      Found in library/packages/src/modules/PackageCallbacks.rb - About 1 hr to fix

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

                                            def main
                                              Yast.import "UI"
                                              textdomain "base"
                                        
                                              Yast.import "XML"
                                        Severity: Minor
                                        Found in library/control/src/modules/ProductControl.rb - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language