hackedteam/vector-edk

View on GitHub

Showing 9,525 of 13,510 total issues

Document has 33 functions (exceeds 20 allowed). Consider refactoring.
Open

class Document(Node, DocumentLS):
    _child_node_types = (Node.ELEMENT_NODE, Node.PROCESSING_INSTRUCTION_NODE,
                         Node.COMMENT_NODE, Node.DOCUMENT_TYPE_NODE)

    nodeType = Node.DOCUMENT_NODE
Severity: Minor
Found in AppPkg/Applications/Python/Python-2.7.2/Lib/xml/dom/minidom.py - About 4 hrs to fix

    Document has 33 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class Document(Node, DocumentLS):
        _child_node_types = (Node.ELEMENT_NODE, Node.PROCESSING_INSTRUCTION_NODE,
                             Node.COMMENT_NODE, Node.DOCUMENT_TYPE_NODE)
    
        nodeType = Node.DOCUMENT_NODE
    Severity: Minor
    Found in vector-uefi/fd/efi/StdLib/lib/python.27/xml/dom/minidom.py - About 4 hrs to fix

      Method Code has 104 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public boolean Code(java.io.InputStream inStream, java.io.OutputStream outStream,
                  long outSize) throws IOException
          {
              m_RangeDecoder.SetStream(inStream);
              m_OutWindow.SetStream(outStream);
      Severity: Major
      Found in vector-uefi/insyde/7zip/Java/SevenZip/Compression/LZMA/Decoder.java - About 4 hrs to fix

        File header.py has 340 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        # Copyright (C) 2002-2006 Python Software Foundation
        # Author: Ben Gertzfield, Barry Warsaw
        # Contact: email-sig@python.org
        
        """Header encoding and decoding functionality."""
        Severity: Minor
        Found in AppPkg/Applications/Python/Python-2.7.2/Lib/email/header.py - About 4 hrs to fix

          File _strptime.py has 340 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          """Strptime-related classes and functions.
          
          CLASSES:
              LocaleTime -- Discovers and stores locale-specific time information
              TimeRE -- Creates regexes for pattern matching a string of text containing
          Severity: Minor
          Found in AppPkg/Applications/Python/Python-2.7.2/Lib/_strptime.py - About 4 hrs to fix

            File header.py has 340 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            # Copyright (C) 2002-2006 Python Software Foundation
            # Author: Ben Gertzfield, Barry Warsaw
            # Contact: email-sig@python.org
            
            """Header encoding and decoding functionality."""
            Severity: Minor
            Found in vector-uefi/fd/efi/StdLib/lib/python.27/email/header.py - About 4 hrs to fix

              File _strptime.py has 340 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              """Strptime-related classes and functions.
              
              CLASSES:
                  LocaleTime -- Discovers and stores locale-specific time information
                  TimeRE -- Creates regexes for pattern matching a string of text containing
              Severity: Minor
              Found in vector-uefi/fd/efi/StdLib/lib/python.27/_strptime.py - About 4 hrs to fix

                File csv.py has 339 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                """
                csv.py - read/write/investigate CSV files
                """
                
                import re
                Severity: Minor
                Found in AppPkg/Applications/Python/Python-2.7.2/Lib/csv.py - About 4 hrs to fix

                  File csv.py has 339 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  """
                  csv.py - read/write/investigate CSV files
                  """
                  
                  import re
                  Severity: Minor
                  Found in vector-uefi/fd/efi/StdLib/lib/python.27/csv.py - About 4 hrs to fix

                    File pindent.py has 337 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    #! /usr/bin/env python
                    
                    # This file contains a class and a main program that perform three
                    # related (though complimentary) formatting operations on Python
                    # programs.  When called as "pindent -c", it takes a valid Python
                    Severity: Minor
                    Found in AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/pindent.py - About 4 hrs to fix

                      File feedparser.py has 337 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      # Copyright (C) 2004-2006 Python Software Foundation
                      # Authors: Baxter, Wouters and Warsaw
                      # Contact: email-sig@python.org
                      
                      """FeedParser - An email feed parser.
                      Severity: Minor
                      Found in AppPkg/Applications/Python/Python-2.7.2/Lib/email/feedparser.py - About 4 hrs to fix

                        File feedparser.py has 337 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        # Copyright (C) 2004-2006 Python Software Foundation
                        # Authors: Baxter, Wouters and Warsaw
                        # Contact: email-sig@python.org
                        
                        """FeedParser - An email feed parser.
                        Severity: Minor
                        Found in vector-uefi/fd/efi/StdLib/lib/python.27/email/feedparser.py - About 4 hrs to fix

                          Function CheckModuleDepexSatisfied has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
                          Open

                              def CheckModuleDepexSatisfied(self, ModuleObj, DpObj=None, \
                                                            ReturnCode=DEPEX_CHECK_SUCCESS):
                                  if ReturnCode:
                                      pass
                                  Logger.Verbose(ST.MSG_CHECK_MODULE_DEPEX_START)
                          Severity: Minor
                          Found in BaseTools/Source/Python/UPT/Core/DependencyRules.py - About 4 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 GenProtocolPPiSections has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
                          Open

                          def GenProtocolPPiSections(ObjList, IsProtocol):
                              Content = ''
                              Dict = Sdict()
                              for Object in ObjList:
                                  HelpTextList = Object.GetHelpTextList()
                          Severity: Minor
                          Found in BaseTools/Source/Python/UPT/GenMetaFile/GenInfFile.py - About 4 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 AddToBuffer has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
                          Open

                              def AddToBuffer (self, Buffer) :
                          
                                  GenFdsGlobalVariable.InfLogger( "\nGenerating %s Option ROM ..." %self.DriverName)
                          
                                  EfiFileList = []
                          Severity: Minor
                          Found in BaseTools/Source/Python/GenFds/OptionRom.py - About 4 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 __init__ has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
                          Open

                              def __init__(self, Wa):
                                  self.AllPcds = {}
                                  self.MaxLen = 0
                                  if Wa.FdfProfile:
                                      self.FdfPcdSet = Wa.FdfProfile.PcdDict
                          Severity: Minor
                          Found in BaseTools/Source/Python/build/BuildReport.py - About 4 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 __GetFileOpts has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
                          Open

                              def __GetFileOpts(self, FfsFileObj):
                          
                                  if self.__GetNextToken():
                                      Pattern = re.compile(r'([a-zA-Z0-9\-]+|\$\(TARGET\)|\*)_([a-zA-Z0-9\-]+|\$\(TOOL_CHAIN_TAG\)|\*)_([a-zA-Z0-9\-]+|\$\(ARCH\)|\*)')
                                      if Pattern.match(self.__Token):
                          Severity: Minor
                          Found in BaseTools/Source/Python/GenFds/FdfParser.py - About 4 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 _CheckPcdDefineAndType has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
                          Open

                              def _CheckPcdDefineAndType(self):
                                  PcdTypeList = [
                                      "FixedAtBuild", "PatchableInModule", "FeatureFlag",
                                      "Dynamic", #"DynamicHii", "DynamicVpd",
                                      "DynamicEx", # "DynamicExHii", "DynamicExVpd"
                          Severity: Minor
                          Found in BaseTools/Source/Python/AutoGen/AutoGen.py - About 4 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 _GetBuildRules has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
                          Open

                              def _GetBuildRules(self):
                                  if self._BuildRules == None:
                                      BuildRules = {}
                                      BuildRuleDatabase = self.PlatformInfo.BuildRule
                                      for Type in BuildRuleDatabase.FileTypeList:
                          Severity: Minor
                          Found in BaseTools/Source/Python/AutoGen/AutoGen.py - About 4 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 _GetIncludePathList has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
                          Open

                              def _GetIncludePathList(self):
                                  if self._IncludePathList == None:
                                      self._IncludePathList = []
                                      if self.AutoGenVersion < 0x00010005:
                                          for Inc in self.Module.Includes:
                          Severity: Minor
                          Found in BaseTools/Source/Python/AutoGen/AutoGen.py - About 4 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