hackedteam/vector-edk

View on GitHub

Showing 9,525 of 13,510 total issues

ModuleHeaderObject has 27 functions (exceeds 20 allowed). Consider refactoring.
Open

class ModuleHeaderObject(IdentificationObject, CommonHeaderObject):
    def __init__(self):
        self.IsLibrary = False
        self.IsLibraryModList = []
        self.ModuleType = ''
Severity: Minor
Found in BaseTools/Source/Python/UPT/Object/POM/ModuleObject.py - About 3 hrs to fix

    PcdObject has 27 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class PcdObject(CommonPropertiesObject, HelpTextListObject):
        def __init__(self):
            self.PcdCName = ''
            self.CName = ''
            self.Token = ''
    Severity: Minor
    Found in BaseTools/Source/Python/UPT/Object/POM/CommonObject.py - About 3 hrs to fix

      ObjectDefinition has 27 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class ObjectDefinition(GeneratorGroup):
          "Spit out code that together defines a new Python object type"
          basechain = "NULL"
          tp_flags = "Py_TPFLAGS_DEFAULT"
          basetype = None

        Message has 27 functions (exceeds 20 allowed). Consider refactoring.
        Open

        class Message:
            """Represents a single RFC 2822-compliant message."""
        
            def __init__(self, fp, seekable = 1):
                """Initialize the class instance and read the headers."""
        Severity: Minor
        Found in AppPkg/Applications/Python/Python-2.7.2/Lib/rfc822.py - About 3 hrs to fix

          Win32Helper has 27 functions (exceeds 20 allowed). Consider refactoring.
          Open

          class Win32Helper:
          
              def __init__(self):
                  import platform
                  self.os_system  = platform.system()
          Severity: Minor
          Found in vector-uefi/fd/tool/chipsec/helper/win/win32helper.py - About 3 hrs to fix

            Message has 27 functions (exceeds 20 allowed). Consider refactoring.
            Open

            class Message:
                """Represents a single RFC 2822-compliant message."""
            
                def __init__(self, fp, seekable = 1):
                    """Initialize the class instance and read the headers."""
            Severity: Minor
            Found in vector-uefi/fd/efi/StdLib/lib/python.27/rfc822.py - About 3 hrs to fix

              Method Skip has 79 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public void Skip(int num) throws IOException
                  {
                      do
                      {
                          int lenLimit;
              Severity: Major
              Found in vector-uefi/insyde/7zip/Java/SevenZip/Compression/LZ/BinTree.java - About 3 hrs to fix

                File Decoder.java has 297 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                package SevenZip.Compression.LZMA;
                
                import SevenZip.Compression.RangeCoder.BitTreeDecoder;
                import SevenZip.Compression.LZMA.Base;
                import SevenZip.Compression.LZ.OutWindow;
                Severity: Minor
                Found in vector-uefi/insyde/7zip/Java/SevenZip/Compression/LZMA/Decoder.java - About 3 hrs to fix

                  File charset.py has 297 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  # Copyright (C) 2001-2006 Python Software Foundation
                  # Author: Ben Gertzfield, Barry Warsaw
                  # Contact: email-sig@python.org
                  
                  __all__ = [
                  Severity: Minor
                  Found in AppPkg/Applications/Python/Python-2.7.2/Lib/email/charset.py - About 3 hrs to fix

                    File charset.py has 297 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    # Copyright (C) 2001-2006 Python Software Foundation
                    # Author: Ben Gertzfield, Barry Warsaw
                    # Contact: email-sig@python.org
                    
                    __all__ = [
                    Severity: Minor
                    Found in vector-uefi/fd/efi/StdLib/lib/python.27/email/charset.py - About 3 hrs to fix

                      File CGIHTTPServer.py has 296 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      """CGI-savvy HTTP Server.
                      
                      This module builds on SimpleHTTPServer by implementing GET and POST
                      requests to cgi-bin scripts.
                      
                      Severity: Minor
                      Found in AppPkg/Applications/Python/Python-2.7.2/Lib/CGIHTTPServer.py - About 3 hrs to fix

                        File CGIHTTPServer.py has 296 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        """CGI-savvy HTTP Server.
                        
                        This module builds on SimpleHTTPServer by implementing GET and POST
                        requests to cgi-bin scripts.
                        
                        Severity: Minor
                        Found in vector-uefi/fd/efi/StdLib/lib/python.27/CGIHTTPServer.py - About 3 hrs to fix

                          Function CheckPcdDatum has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
                          Open

                          def CheckPcdDatum(Type, Value):
                              if Type == "VOID*":
                                  ValueRe  = re.compile(r'\s*L?\".*\"\s*$')
                                  if not (((Value.startswith('L"') or Value.startswith('"')) and Value.endswith('"'))
                                          or (Value.startswith('{') and Value.endswith('}'))
                          Severity: Minor
                          Found in BaseTools/Source/Python/Common/Misc.py - About 3 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 GenNmakes has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
                          Open

                              def GenNmakes(self, ContainerFile):
                                  EdkLogger.debug(2, "Generate %s ..." % TAB_NMAKE)
                                  Nmakes = sdict()
                                  #
                                  # Get all Nmakes
                          Severity: Minor
                          Found in BaseTools/Source/Python/Common/InfClassObject.py - About 3 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 GenModuleHeaderUserExt has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
                          Open

                          def GenModuleHeaderUserExt(DefineObj, ArchString):
                              DefinesDictNew = {}
                              EdkReleaseVersion = DefineObj.GetEdkReleaseVersion()
                              Shadow = DefineObj.GetShadow()
                              DpxSource = DefineObj.GetDpxSource()
                          Severity: Minor
                          Found in BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py - About 3 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 FromXml has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
                          Open

                              def FromXml(self, Item, Key):
                                  if Key:
                                      pass
                                  #
                                  # Create a package object
                          Severity: Minor
                          Found in BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py - About 3 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 GenGuidSections has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
                          Open

                          def GenGuidSections(GuidObjList):
                              #
                              # generate [Guids] section
                              #
                              Content = '' 
                          Severity: Minor
                          Found in BaseTools/Source/Python/UPT/GenMetaFile/GenInfFile.py - About 3 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 GenSection has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
                          Open

                          def GenSection(SectionName, SectionDict, SplitArch=True):
                              Content = ''
                              for SectionAttrs in SectionDict:
                                  StatementList = SectionDict[SectionAttrs]
                                  if SectionAttrs and SectionName != 'Defines' and SectionAttrs.strip().upper() != DataType.TAB_ARCH_COMMON:
                          Severity: Minor
                          Found in BaseTools/Source/Python/UPT/Library/Parsing.py - About 3 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 ValidatePcdValueOnDatumType has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
                          Open

                          def ValidatePcdValueOnDatumType(Value, Type):
                              
                              Value = Value.strip()
                              #
                              # Boolean type only allow 0x00 or 0x01 as value per INF spec
                          Severity: Minor
                          Found in BaseTools/Source/Python/UPT/Object/Parser/InfPcdObject.py - About 3 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 22 (exceeds 5 allowed). Consider refactoring.
                          Open

                              def GetBuildRules(Inf, Arch):
                                  if not Arch:
                                      Arch = 'COMMON'
                          
                                  if not Arch in GenFdsGlobalVariable.OutputDirDict:
                          Severity: Minor
                          Found in BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py - About 3 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