hackedteam/vector-edk

View on GitHub

Showing 9,525 of 13,510 total issues

File InstallPkg.py has 496 lines of code (exceeds 250 allowed). Consider refactoring.
Open

## @file
# Install distribution package.
#
# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
#
Severity: Minor
Found in BaseTools/Source/Python/UPT/InstallPkg.py - About 7 hrs to fix

    File pygettext.py has 495 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    Severity: Minor
    Found in AppPkg/Applications/Python/Python-2.7.2/Tools/i18n/pygettext.py - About 7 hrs to fix

      File nntplib.py has 495 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      """An NNTP client class based on RFC 977: Network News Transfer Protocol.
      
      Example:
      
      >>> from nntplib import NNTP
      Severity: Minor
      Found in AppPkg/Applications/Python/Python-2.7.2/Lib/nntplib.py - About 7 hrs to fix

        File nntplib.py has 495 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        """An NNTP client class based on RFC 977: Network News Transfer Protocol.
        
        Example:
        
        >>> from nntplib import NNTP
        Severity: Minor
        Found in vector-uefi/fd/efi/StdLib/lib/python.27/nntplib.py - About 7 hrs to fix

          File collections.py has 493 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          __all__ = ['Counter', 'deque', 'defaultdict', 'namedtuple', 'OrderedDict']
          # For bootstrapping reasons, the collection ABCs are defined in _abcoll.py.
          # They should however be considered an integral part of collections.py.
          from _abcoll import *
          import _abcoll
          Severity: Minor
          Found in AppPkg/Applications/Python/Python-2.7.2/Lib/collections.py - About 7 hrs to fix

            File collections.py has 493 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            __all__ = ['Counter', 'deque', 'defaultdict', 'namedtuple', 'OrderedDict']
            # For bootstrapping reasons, the collection ABCs are defined in _abcoll.py.
            # They should however be considered an integral part of collections.py.
            from _abcoll import *
            import _abcoll
            Severity: Minor
            Found in vector-uefi/fd/efi/StdLib/lib/python.27/collections.py - About 7 hrs to fix

              File build_ext.py has 490 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              """distutils.command.build_ext
              
              Implements the Distutils 'build_ext' command, for building extension
              modules (currently limited to C extensions, should accommodate C++
              extensions ASAP)."""

                File build_ext.py has 490 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                """distutils.command.build_ext
                
                Implements the Distutils 'build_ext' command, for building extension
                modules (currently limited to C extensions, should accommodate C++
                extensions ASAP)."""

                  Function _GetHeaderInfo has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def _GetHeaderInfo(self):
                          RecordList = self._RawData[MODEL_META_DATA_HEADER, self._Arch]
                          for Record in RecordList:
                              Name = Record[1]
                              # items defined _PROPERTY_ don't need additional processing
                  Severity: Minor
                  Found in BaseTools/Source/Python/Workspace/WorkspaceDatabase.py - About 7 hrs 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 InfBuildOptionParser has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def InfBuildOptionParser(self, SectionString, InfSectionObject, FileName):
                          
                          BuildOptionList = []
                          SectionContent  = ''
                          
                  Severity: Minor
                  Found in BaseTools/Source/Python/UPT/Parser/InfBuildOptionSectionParser.py - About 7 hrs 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 GetParamList has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring.
                  Open

                  def GetParamList(FuncDeclarator, FuncNameLine=0, FuncNameOffset=0):
                      FuncDeclarator = StripComments(FuncDeclarator)
                      ParamIdList = []
                      #DeclSplitList = FuncDeclarator.split('(')
                      LBPos = FuncDeclarator.find('(')
                  Severity: Minor
                  Found in BaseTools/Source/Python/Ecc/c.py - About 7 hrs 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 declaration_specifiers has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def declaration_specifiers(self, ):
                  
                          retval = self.declaration_specifiers_return()
                          retval.start = self.input.LT(1)
                          declaration_specifiers_StartIndex = self.input.index()
                  Severity: Minor
                  Found in BaseTools/Source/Python/Ecc/CParser.py - About 7 hrs 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 jump_statement has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def jump_statement(self, ):
                  
                          jump_statement_StartIndex = self.input.index()
                          try:
                              try:
                  Severity: Minor
                  Found in BaseTools/Source/Python/Ecc/CParser.py - About 7 hrs 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 PreprocessFileWithClear has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def PreprocessFileWithClear(self):
                  
                          self.Rewind()
                          InComment = False
                          DoubleSlashComment = False
                  Severity: Minor
                  Found in BaseTools/Source/Python/Ecc/CodeFragmentCollector.py - About 7 hrs 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 declaration_specifiers has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def declaration_specifiers(self, ):
                  
                          retval = self.declaration_specifiers_return()
                          retval.start = self.input.LT(1)
                          declaration_specifiers_StartIndex = self.input.index()
                  Severity: Minor
                  Found in BaseTools/Source/Python/Eot/CParser.py - About 7 hrs 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 jump_statement has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def jump_statement(self, ):
                  
                          jump_statement_StartIndex = self.input.index()
                          try:
                              try:
                  Severity: Minor
                  Found in BaseTools/Source/Python/Eot/CParser.py - About 7 hrs 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 SearchPpiCallFunction has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring.
                  Open

                  def SearchPpiCallFunction(Identifier, SourceFileID, SourceFileFullPath, ItemMode):
                      ItemName, ItemType, GuidName, GuidMacro, GuidValue = '', 'Ppi', '', '', ''
                      SqlCommand = """select Value, Name, BelongsToFile, StartLine, EndLine from %s
                                      where (Name like '%%%s%%' and Model = %s)""" \
                                      % (Identifier, 'PeiServicesReInstallPpi', MODEL_IDENTIFIER_FUNCTION_CALLING)
                  Severity: Minor
                  Found in BaseTools/Source/Python/Eot/Parser.py - About 7 hrs 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 docmodule has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def docmodule(self, object, name=None, mod=None):
                          """Produce text documentation for a given module object."""
                          name = object.__name__ # ignore the passed-in name
                          synop, desc = splitdoc(getdoc(object))
                          result = self.section('NAME', name + (synop and ' - ' + synop))
                  Severity: Minor
                  Found in AppPkg/Applications/Python/PyMod-2.7.2/Lib/pydoc.py - About 7 hrs 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 docmodule has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def docmodule(self, object, name=None, mod=None):
                          """Produce text documentation for a given module object."""
                          name = object.__name__ # ignore the passed-in name
                          synop, desc = splitdoc(getdoc(object))
                          result = self.section('NAME', name + (synop and ' - ' + synop))
                  Severity: Minor
                  Found in AppPkg/Applications/Python/Python-2.7.2/Lib/pydoc.py - About 7 hrs 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 _really_load has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def _really_load(self, f, filename, ignore_discard, ignore_expires):
                          magic = f.readline()
                          if not re.search(self.magic_re, magic):
                              msg = ("%r does not look like a Set-Cookie3 (LWP) format "
                                     "file" % filename)
                  Severity: Minor
                  Found in AppPkg/Applications/Python/Python-2.7.2/Lib/_LWPCookieJar.py - About 7 hrs 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