hackedteam/vector-edk

View on GitHub

Showing 9,525 of 13,510 total issues

File optparse.py has 1256 lines of code (exceeds 250 allowed). Consider refactoring.
Open

"""A powerful, extensible, and easy-to-use option parser.

By Greg Ward <gward@python.net>

Originally distributed as Optik.
Severity: Major
Found in vector-uefi/fd/efi/StdLib/lib/python.27/optparse.py - About 3 days to fix

    Function GenModuleDatabase has a Cognitive Complexity of 159 (exceeds 5 allowed). Consider refactoring.
    Open

        def GenModuleDatabase(self, InfList = []):
            for Inf in self.InfDatabase.keys():
                Module = self.InfDatabase[Inf].Module
    
                for Arch in self.SupArchList:
    Severity: Minor
    Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py - About 3 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 GenPcdDb.py has 1235 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    ## @file
    # Routines for generating Pcd Database
    #
    # Copyright (c) 2013, Intel Corporation. All rights reserved.<BR>
    # This program and the accompanying materials
    Severity: Major
    Found in BaseTools/Source/Python/AutoGen/GenPcdDb.py - About 3 days to fix

      File Encoder.java has 1232 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      package SevenZip.Compression.LZMA;
      
      import SevenZip.Compression.RangeCoder.BitTreeEncoder;
      import SevenZip.Compression.LZMA.Base;
      import SevenZip.Compression.LZ.BinTree;
      Severity: Major
      Found in vector-uefi/insyde/7zip/Java/SevenZip/Compression/LZMA/Encoder.java - About 3 days to fix

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

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

        def mirrorsubdir(f, localdir):
            pwd = f.pwd()
            if localdir and not os.path.isdir(localdir):
                if verbose: print 'Creating local directory', repr(localdir)
                try:
        Severity: Minor
        Found in AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/ftpmirror.py - About 3 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 GenC.py has 1202 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        ## @file
        # Routines for generating AutoGen.h and AutoGen.c
        #
        # Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.<BR>
        # This program and the accompanying materials
        Severity: Major
        Found in BaseTools/Source/Python/AutoGen/GenC.py - About 3 days to fix

          Function _readmodule has a Cognitive Complexity of 152 (exceeds 5 allowed). Consider refactoring.
          Open

          def _readmodule(module, path, inpackage=None):
              '''Do the hard work for readmodule[_ex].
          
              If INPACKAGE is given, it must be the dotted name of the package in
              which we are searching for a submodule, and then PATH must be the
          Severity: Minor
          Found in AppPkg/Applications/Python/Python-2.7.2/Lib/pyclbr.py - About 3 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 _readmodule has a Cognitive Complexity of 152 (exceeds 5 allowed). Consider refactoring.
          Open

          def _readmodule(module, path, inpackage=None):
              '''Do the hard work for readmodule[_ex].
          
              If INPACKAGE is given, it must be the dotted name of the package in
              which we are searching for a submodule, and then PATH must be the
          Severity: Minor
          Found in vector-uefi/fd/efi/StdLib/lib/python.27/pyclbr.py - About 3 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 build.py has 1192 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          ## @file
          # build a platform or a module
          #
          #  Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.<BR>
          #
          Severity: Major
          Found in BaseTools/Source/Python/build/build.py - About 3 days to fix

            Function main has a Cognitive Complexity of 150 (exceeds 5 allowed). Consider refactoring.
            Open

            def main():
                # overridable context
                prefix = None                       # settable with -p option
                exec_prefix = None                  # settable with -P option
                extensions = []
            Severity: Minor
            Found in AppPkg/Applications/Python/Python-2.7.2/Tools/freeze/freeze.py - About 3 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 Misc.py has 1176 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            ## @file
            # Common routines used by all tools
            #
            # Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
            # This program and the accompanying materials
            Severity: Major
            Found in BaseTools/Source/Python/Common/Misc.py - About 3 days to fix

              Function GenerateReport has a Cognitive Complexity of 147 (exceeds 5 allowed). Consider refactoring.
              Open

                  def GenerateReport(self, File, ModulePcdSet):
                      if ModulePcdSet == None:
                          #
                          # For platform global PCD section
                          #
              Severity: Minor
              Found in BaseTools/Source/Python/build/BuildReport.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 CreateModulePcdCode has a Cognitive Complexity of 146 (exceeds 5 allowed). Consider refactoring.
              Open

              def CreateModulePcdCode(Info, AutoGenC, AutoGenH, Pcd):
                  TokenSpaceGuidValue = Pcd.TokenSpaceGuidValue   #Info.GuidList[Pcd.TokenSpaceGuidCName]
                  PcdTokenNumber = Info.PlatformInfo.PcdTokenNumber
                  #
                  # Write PCDs
              Severity: Minor
              Found in BaseTools/Source/Python/AutoGen/GenC.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 transformer.py has 1156 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              """Parse tree transformation module.
              
              Transforms Python source code into an abstract syntax tree (AST)
              defined in the ast module.
              
              Severity: Major
              Found in AppPkg/Applications/Python/Python-2.7.2/Lib/compiler/transformer.py - About 2 days to fix

                File transformer.py has 1156 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                """Parse tree transformation module.
                
                Transforms Python source code into an abstract syntax tree (AST)
                defined in the ast module.
                
                Severity: Major
                Found in vector-uefi/fd/efi/StdLib/lib/python.27/compiler/transformer.py - About 2 days to fix

                  Function pointer has a Cognitive Complexity of 143 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def pointer(self, ):
                  
                          pointer_StartIndex = self.input.index()
                          try:
                              try:
                  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 function_definition has a Cognitive Complexity of 143 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def function_definition(self, ):
                          self.function_definition_stack.append(function_definition_scope())
                          retval = self.function_definition_return()
                          retval.start = self.input.LT(1)
                          function_definition_StartIndex = self.input.index()
                  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 function_definition has a Cognitive Complexity of 143 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def function_definition(self, ):
                          self.function_definition_stack.append(function_definition_scope())
                          retval = self.function_definition_return()
                          retval.start = self.input.LT(1)
                          function_definition_StartIndex = self.input.index()
                  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 pointer has a Cognitive Complexity of 143 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def pointer(self, ):
                  
                          pointer_StartIndex = self.input.index()
                          try:
                              try:
                  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

                  Severity
                  Category
                  Status
                  Source
                  Language