hackedteam/core-linux

View on GitHub

Showing 117 of 141 total issues

Function post_process has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def post_process(self, interface_prefix, cns, cns_upper, cns_lower, arg_number):

    Function post_process has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def post_process(self, interface_prefix, cns, cns_upper, cns_lower, arg_number):
    Severity: Minor
    Found in core/multilib/i386/usr/lib/i386-linux-gnu/gdbus-2.0/codegen/dbustypes.py - About 35 mins to fix

      Function g_type_to_name has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

      def g_type_to_name (gtype):
          def lookup_fundamental_type (typenode):
              if typenode == 0:
                  return None
              val = read_global_var ("static_fundamental_type_nodes")
      Severity: Minor
      Found in core/multilib/x86_64/usr/share/glib-2.0/gdb/gobject.py - About 35 mins to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function generate_expand_dicts has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

          def generate_expand_dicts(self):
              self.expand_member_dict = {}
              self.expand_iface_dict = {}
              for i in self.ifaces:
                  key = '#%s'%(i.name)

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function generate_signal_emitters has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

          def generate_signal_emitters(self, i):
              for s in i.signals:
                  self.c.write(self.docbook_gen.expand(
                          '/**\n'
                          ' * %s_emit_%s:\n'
      Severity: Minor
      Found in core/multilib/i386/usr/lib/i386-linux-gnu/gdbus-2.0/codegen/codegen.py - About 35 mins to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function generate_expand_dicts has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

          def generate_expand_dicts(self):
              self.expand_member_dict = {}
              self.expand_iface_dict = {}
              for i in self.ifaces:
                  key = '#%s'%(i.name)

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function g_type_to_name has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

      def g_type_to_name (gtype):
          def lookup_fundamental_type (typenode):
              if typenode == 0:
                  return None
              val = read_global_var ("static_fundamental_type_nodes")
      Severity: Minor
      Found in core/multilib/i386/usr/share/glib-2.0/gdb/gobject.py - About 35 mins to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function generate_signal_emitters has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

          def generate_signal_emitters(self, i):
              for s in i.signals:
                  self.c.write(self.docbook_gen.expand(
                          '/**\n'
                          ' * %s_emit_%s:\n'

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Avoid too many return statements within this function.
      Open

                  return GListPrinter(val, "GSList")
      Severity: Major
      Found in core/multilib/x86_64/usr/share/glib-2.0/gdb/glib.py - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                    return GListPrinter(val, "GSList")
        Severity: Major
        Found in core/multilib/i386/usr/share/glib-2.0/gdb/glib.py - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

              return None
          Severity: Major
          Found in core/multilib/x86_64/usr/share/glib-2.0/gdb/glib.py - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                return None
            Severity: Major
            Found in core/multilib/i386/usr/share/glib-2.0/gdb/glib.py - About 30 mins to fix

              Function read_object has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

                  def read_object (self, frame, name, array = None):
                      try:
                          v = frame.read_var (name)
                          if v == None or v.is_optimized_out:
                              return None
              Severity: Minor
              Found in core/multilib/x86_64/usr/share/glib-2.0/gdb/gobject.py - About 25 mins to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function lookup_annotation has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              def lookup_annotation(annotations, key):
                  if annotations:
                      for a in annotations:
                          if a.key == key:
                              return a.value
              Severity: Minor
              Found in core/multilib/i386/usr/lib/i386-linux-gnu/gdbus-2.0/codegen/utils.py - About 25 mins to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function lookup_annotation has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              def lookup_annotation(annotations, key):
                  if annotations:
                      for a in annotations:
                          if a.key == key:
                              return a.value
              Severity: Minor
              Found in core/multilib/x86_64/usr/lib/x86_64-linux-gnu/gdbus-2.0/codegen/utils.py - About 25 mins to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Method login has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

                def login(host, port, user, pass)
                  @host = host || 'rcs-castore'
                  @port = port || 443
                  @user = user || 'fabiolinux'
                  @pass = pass || 'fabiop123'
              Severity: Minor
              Found in build/script/rcs-core.rb - About 25 mins to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function read_object has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

                  def read_object (self, frame, name, array = None):
                      try:
                          v = frame.read_var (name)
                          if v == None or v.is_optimized_out:
                              return None
              Severity: Minor
              Found in core/multilib/i386/usr/share/glib-2.0/gdb/gobject.py - About 25 mins to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Severity
              Category
              Status
              Source
              Language