hackedteam/vector-edk

View on GitHub

Showing 9,525 of 13,510 total issues

Function __GetEfiSection has a Cognitive Complexity of 117 (exceeds 5 allowed). Consider refactoring.
Open

    def __GetEfiSection(self, Obj):
        
        OldPos = self.GetFileBufferPos()
        if not self.__GetNextWord():
            return False
Severity: Minor
Found in BaseTools/Source/Python/Common/FdfParserLite.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 __GetEfiSection has a Cognitive Complexity of 117 (exceeds 5 allowed). Consider refactoring.
Open

    def __GetEfiSection(self, Obj):

        OldPos = self.GetFileBufferPos()
        if not self.__GetNextWord():
            return False
Severity: Minor
Found in BaseTools/Source/Python/GenFds/FdfParser.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 parameter_declaration has a Cognitive Complexity of 117 (exceeds 5 allowed). Consider refactoring.
Open

    def parameter_declaration(self, ):

        parameter_declaration_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 parameter_declaration has a Cognitive Complexity of 117 (exceeds 5 allowed). Consider refactoring.
Open

    def parameter_declaration(self, ):

        parameter_declaration_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

File handlers.py has 948 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# Copyright 2001-2010 by Vinay Sajip. All Rights Reserved.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted,
# provided that the above copyright notice appear in all copies and that
Severity: Major
Found in AppPkg/Applications/Python/Python-2.7.2/Lib/logging/handlers.py - About 2 days to fix

    File handlers.py has 948 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    # Copyright 2001-2010 by Vinay Sajip. All Rights Reserved.
    #
    # Permission to use, copy, modify, and distribute this software and its
    # documentation for any purpose and without fee is hereby granted,
    # provided that the above copyright notice appear in all copies and that
    Severity: Major
    Found in vector-uefi/fd/efi/StdLib/lib/python.27/logging/handlers.py - About 2 days to fix

      File CommentGeneratingUnitTest.py has 941 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      ## @file
      # This file contain unit test for CommentParsing
      #
      # Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
      #
      Severity: Major
      Found in BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py - About 2 days to fix

        File schema.py has 920 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        from msilib import Table
        
        _Validation = Table('_Validation')
        _Validation.add_field(1,'Table',11552)
        _Validation.add_field(2,'Column',11552)
        Severity: Major
        Found in AppPkg/Applications/Python/Python-2.7.2/Tools/msi/schema.py - About 2 days to fix

          CLexer has 116 functions (exceeds 20 allowed). Consider refactoring.
          Open

          class CLexer(Lexer):
          
              grammarFileName = "C.g"
          
              def __init__(self, input=None):
          Severity: Major
          Found in BaseTools/Source/Python/Ecc/CLexer.py - About 2 days to fix

            CLexer has 116 functions (exceeds 20 allowed). Consider refactoring.
            Open

            class CLexer(Lexer):
            
                grammarFileName = "C.g"
            
                def __init__(self, input=None):
            Severity: Major
            Found in BaseTools/Source/Python/Eot/CLexer.py - About 2 days to fix

              Transformer has 116 functions (exceeds 20 allowed). Consider refactoring.
              Open

              class Transformer:
                  """Utility object for transforming Python parse trees.
              
                  Exposes the following methods:
                      tree = transform(ast_tree)
              Severity: Major
              Found in AppPkg/Applications/Python/Python-2.7.2/Lib/compiler/transformer.py - About 2 days to fix

                Transformer has 116 functions (exceeds 20 allowed). Consider refactoring.
                Open

                class Transformer:
                    """Utility object for transforming Python parse trees.
                
                    Exposes the following methods:
                        tree = transform(ast_tree)
                Severity: Major
                Found in vector-uefi/fd/efi/StdLib/lib/python.27/compiler/transformer.py - About 2 days to fix

                  Method GetOptimum has 446 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          UInt32 GetOptimum(UInt32 position, out UInt32 backRes)
                          {
                              if (_optimumEndIndex != _optimumCurrentIndex)
                              {
                                  UInt32 lenRes = _optimum[_optimumCurrentIndex].PosPrev - _optimumCurrentIndex;
                  Severity: Major
                  Found in vector-uefi/insyde/7zip/CS/7zip/Compress/LZMA/LzmaEncoder.cs - About 2 days to fix

                    Decimal has 115 functions (exceeds 20 allowed). Consider refactoring.
                    Open

                    class Decimal(object):
                        """Floating point class for decimal arithmetic."""
                    
                        __slots__ = ('_exp','_int','_sign', '_is_special')
                        # Generally, the value of the Decimal instance is given by
                    Severity: Major
                    Found in AppPkg/Applications/Python/Python-2.7.2/Lib/decimal.py - About 2 days to fix

                      Decimal has 115 functions (exceeds 20 allowed). Consider refactoring.
                      Open

                      class Decimal(object):
                          """Floating point class for decimal arithmetic."""
                      
                          __slots__ = ('_exp','_int','_sign', '_is_special')
                          # Generally, the value of the Decimal instance is given by
                      Severity: Major
                      Found in vector-uefi/fd/efi/StdLib/lib/python.27/decimal.py - About 2 days to fix

                        Method GetOptimum has 440 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            int GetOptimum(int position) throws IOException
                            {
                                if (_optimumEndIndex != _optimumCurrentIndex)
                                {
                                    int lenRes = _optimum[_optimumCurrentIndex].PosPrev - _optimumCurrentIndex;
                        Severity: Major
                        Found in vector-uefi/insyde/7zip/Java/SevenZip/Compression/LZMA/Encoder.java - About 2 days to fix

                          Function PreprocessConditionalStatement has a Cognitive Complexity of 109 (exceeds 5 allowed). Consider refactoring.
                          Open

                              def PreprocessConditionalStatement(self):
                                  # IfList is a stack of if branches with elements of list [Pos, CondSatisfied, BranchDetermined]
                                  IfList = []
                                  RegionLayoutLine = 0
                                  ReplacedLine = -1
                          Severity: Minor
                          Found in BaseTools/Source/Python/GenFds/FdfParser.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 BuildReport.py has 897 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          ## @file
                          # Routines for generating build report.
                          #
                          # This module contains the functionality to generate build report after
                          # build all target completes successfully.
                          Severity: Major
                          Found in BaseTools/Source/Python/build/BuildReport.py - About 2 days to fix

                            FdfParser has 113 functions (exceeds 20 allowed). Consider refactoring.
                            Open

                            class FdfParser:
                                ## The constructor
                                #
                                #   @param  self        The object pointer
                                #   @param  FileName    The file that to be parsed
                            Severity: Major
                            Found in BaseTools/Source/Python/GenFds/FdfParser.py - About 2 days to fix

                              Function add_files has a Cognitive Complexity of 108 (exceeds 5 allowed). Consider refactoring.
                              Open

                              def add_files(db):
                                  cab = CAB("python")
                                  tmpfiles = []
                                  # Add all executables, icons, text files into the TARGETDIR component
                                  root = PyDirectory(db, cab, None, srcdir, "TARGETDIR", "SourceDir")
                              Severity: Minor
                              Found in AppPkg/Applications/Python/Python-2.7.2/Tools/msi/msi.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