hackedteam/vector-edk

View on GitHub

Showing 9,525 of 13,510 total issues

File urllib2.py has 1024 lines of code (exceeds 250 allowed). Consider refactoring.
Open

"""An extensible library for opening URLs using a variety of protocols

The simplest way to use this module is to call the urlopen function,
which accepts a string containing a URL or a Request object (described
below).  It opens the URL and returns the results as file-like
Severity: Major
Found in AppPkg/Applications/Python/Python-2.7.2/Lib/urllib2.py - About 2 days to fix

    File urllib2.py has 1024 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    """An extensible library for opening URLs using a variety of protocols
    
    The simplest way to use this module is to call the urlopen function,
    which accepts a string containing a URL or a Request object (described
    below).  It opens the URL and returns the results as file-like
    Severity: Major
    Found in vector-uefi/fd/efi/StdLib/lib/python.27/urllib2.py - About 2 days to fix

      File pickle.py has 1023 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      """Create portable serialized representations of Python objects.
      
      See module cPickle for a (much) faster implementation.
      See module copy_reg for a mechanism for registering custom picklers.
      See module pickletools source for extensive comments.
      Severity: Major
      Found in AppPkg/Applications/Python/Python-2.7.2/Lib/pickle.py - About 2 days to fix

        File pickle.py has 1023 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        """Create portable serialized representations of Python objects.
        
        See module cPickle for a (much) faster implementation.
        See module copy_reg for a mechanism for registering custom picklers.
        See module pickletools source for extensive comments.
        Severity: Major
        Found in vector-uefi/fd/efi/StdLib/lib/python.27/pickle.py - About 2 days to fix

          Function UpdateLibrariesOfModule has a Cognitive Complexity of 126 (exceeds 5 allowed). Consider refactoring.
          Open

              def UpdateLibrariesOfModule(self, Platform, Module, Arch):
                  ModuleDatabase = self.Build[Arch].ModuleDatabase
                  ModuleType = Module.ModuleType
          
                  # check Edk module
          Severity: Minor
          Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py - About 2 days 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 _MultiThreadBuildPlatform has a Cognitive Complexity of 126 (exceeds 5 allowed). Consider refactoring.
          Open

              def _MultiThreadBuildPlatform(self):
                  for BuildTarget in self.BuildTargetList:
                      GlobalData.gGlobalDefines['TARGET'] = BuildTarget
                      for ToolChain in self.ToolChainList:
                          GlobalData.gGlobalDefines['TOOLCHAIN'] = ToolChain
          Severity: Minor
          Found in BaseTools/Source/Python/build/build.py - About 2 days 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

          Consider simplifying this complex logical expression.
          Open

                              if LA84 == 62:
                                  LA84_43 = self.input.LA(3)
          
                                  if (self.synpred169()) :
                                      alt84 = 3
          Severity: Critical
          Found in BaseTools/Source/Python/Ecc/CParser.py - About 2 days to fix

            Consider simplifying this complex logical expression.
            Open

                                if LA84 == 62:
                                    LA84_43 = self.input.LA(3)
            
                                    if (self.synpred169()) :
                                        alt84 = 3
            Severity: Critical
            Found in BaseTools/Source/Python/Eot/CParser.py - About 2 days to fix

              Function postfix_expression has a Cognitive Complexity of 124 (exceeds 5 allowed). Consider refactoring.
              Open

                  def postfix_expression(self, ):
                      self.postfix_expression_stack.append(postfix_expression_scope())
                      postfix_expression_StartIndex = self.input.index()
                      a = None
                      b = None
              Severity: Minor
              Found in BaseTools/Source/Python/Ecc/CParser.py - About 2 days 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 postfix_expression has a Cognitive Complexity of 124 (exceeds 5 allowed). Consider refactoring.
              Open

                  def postfix_expression(self, ):
                      self.postfix_expression_stack.append(postfix_expression_scope())
                      postfix_expression_StartIndex = self.input.index()
                      a = None
                      b = None
              Severity: Minor
              Found in BaseTools/Source/Python/Eot/CParser.py - About 2 days 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 GenSection has a Cognitive Complexity of 123 (exceeds 5 allowed). Consider refactoring.
              Open

                  def GenSection(self, OutputPath, ModuleName, SecNum, KeyStringList, FfsInf = None, Dict = {}) :
                      
                      if self.FileName != None and self.FileName.startswith('PCD('):
                          self.FileName = GenFdsGlobalVariable.GetPcdValue(self.FileName)
                      """Prepare the parameter of GenSection"""
              Severity: Minor
              Found in BaseTools/Source/Python/GenFds/EfiSection.py - About 2 days 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 _CheckDuplicateInFV has a Cognitive Complexity of 123 (exceeds 5 allowed). Consider refactoring.
              Open

                  def _CheckDuplicateInFV(self, Fdf):
                      for Fv in Fdf.Profile.FvDict:
                          _GuidDict = {}
                          for FfsFile in Fdf.Profile.FvDict[Fv].FfsList:
                              if FfsFile.InfFileName and FfsFile.NameGuid == None:
              Severity: Minor
              Found in BaseTools/Source/Python/AutoGen/AutoGen.py - About 2 days 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

              File httplib.py has 986 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              """HTTP/1.1 client library
              
              <intro stuff goes here>
              <other stuff, too>
              
              Severity: Major
              Found in AppPkg/Applications/Python/Python-2.7.2/Lib/httplib.py - About 2 days to fix

                File httplib.py has 986 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                """HTTP/1.1 client library
                
                <intro stuff goes here>
                <other stuff, too>
                
                Severity: Major
                Found in vector-uefi/fd/efi/StdLib/lib/python.27/httplib.py - About 2 days to fix

                  Function _make_iterencode has a Cognitive Complexity of 120 (exceeds 5 allowed). Consider refactoring.
                  Open

                  def _make_iterencode(markers, _default, _encoder, _indent, _floatstr,
                          _key_separator, _item_separator, _sort_keys, _skipkeys, _one_shot,
                          ## HACK: hand-optimized bytecode; turn globals into locals
                          ValueError=ValueError,
                          basestring=basestring,
                  Severity: Minor
                  Found in AppPkg/Applications/Python/Python-2.7.2/Lib/json/encoder.py - About 2 days 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 _make_iterencode has a Cognitive Complexity of 120 (exceeds 5 allowed). Consider refactoring.
                  Open

                  def _make_iterencode(markers, _default, _encoder, _indent, _floatstr,
                          _key_separator, _item_separator, _sort_keys, _skipkeys, _one_shot,
                          ## HACK: hand-optimized bytecode; turn globals into locals
                          ValueError=ValueError,
                          basestring=basestring,
                  Severity: Minor
                  Found in vector-uefi/fd/efi/StdLib/lib/python.27/json/encoder.py - About 2 days 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_token has a Cognitive Complexity of 118 (exceeds 5 allowed). Consider refactoring.
                  Open

                  Severity: Minor
                  Found in AppPkg/Applications/Python/Python-2.7.2/Lib/shlex.py - About 2 days 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_token has a Cognitive Complexity of 118 (exceeds 5 allowed). Consider refactoring.
                  Open

                  Severity: Minor
                  Found in vector-uefi/fd/efi/StdLib/lib/python.27/shlex.py - About 2 days 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

                  File xmlrpclib.py has 961 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  #
                  # XML-RPC CLIENT LIBRARY
                  # $Id$
                  #
                  # an XML-RPC client interface for Python.
                  Severity: Major
                  Found in AppPkg/Applications/Python/Python-2.7.2/Lib/xmlrpclib.py - About 2 days to fix

                    File xmlrpclib.py has 961 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    #
                    # XML-RPC CLIENT LIBRARY
                    # $Id$
                    #
                    # an XML-RPC client interface for Python.
                    Severity: Major
                    Found in vector-uefi/fd/efi/StdLib/lib/python.27/xmlrpclib.py - About 2 days to fix
                      Severity
                      Category
                      Status
                      Source
                      Language