hackedteam/vector-edk

View on GitHub

Showing 9,525 of 13,510 total issues

Consider simplifying this complex logical expression.
Open

                    if LA74 == 64:
                        LA74_44 = self.input.LA(3)

                        if (self.synpred142()) :
                            alt74 = 1
Severity: Critical
Found in BaseTools/Source/Python/Ecc/CParser.py - About 1 day to fix

    Consider simplifying this complex logical expression.
    Open

                        if LA74 == 64:
                            LA74_102 = self.input.LA(3)
    
                            if (self.synpred142()) :
                                alt74 = 1
    Severity: Critical
    Found in BaseTools/Source/Python/Ecc/CParser.py - About 1 day to fix

      Consider simplifying this complex logical expression.
      Open

                          if LA74 == IDENTIFIER:
                              LA74_160 = self.input.LA(3)
      
                              if (self.synpred142()) :
                                  alt74 = 1
      Severity: Critical
      Found in BaseTools/Source/Python/Eot/CParser.py - About 1 day to fix

        Consider simplifying this complex logical expression.
        Open

                            if LA74 == 64:
                                LA74_102 = self.input.LA(3)
        
                                if (self.synpred142()) :
                                    alt74 = 1
        Severity: Critical
        Found in BaseTools/Source/Python/Eot/CParser.py - About 1 day to fix

          Consider simplifying this complex logical expression.
          Open

                              if LA74 == 64:
                                  LA74_131 = self.input.LA(3)
          
                                  if (self.synpred142()) :
                                      alt74 = 1
          Severity: Critical
          Found in BaseTools/Source/Python/Eot/CParser.py - About 1 day to fix

            Consider simplifying this complex logical expression.
            Open

                                if LA38 == 66:
                                    LA38_2 = self.input.LA(3)
            
                                    if (self.synpred78()) :
                                        alt38 = 2
            Severity: Critical
            Found in BaseTools/Source/Python/Eot/CParser.py - About 1 day to fix

              Consider simplifying this complex logical expression.
              Open

                                  if LA74 == 64:
                                      LA74_44 = self.input.LA(3)
              
                                      if (self.synpred142()) :
                                          alt74 = 1
              Severity: Critical
              Found in BaseTools/Source/Python/Eot/CParser.py - About 1 day to fix

                Consider simplifying this complex logical expression.
                Open

                                    if LA74 == 64:
                                        LA74_13 = self.input.LA(3)
                
                                        if (self.synpred142()) :
                                            alt74 = 1
                Severity: Critical
                Found in BaseTools/Source/Python/Eot/CParser.py - About 1 day to fix

                  Consider simplifying this complex logical expression.
                  Open

                                      if LA74 == 64:
                                          LA74_73 = self.input.LA(3)
                  
                                          if (self.synpred142()) :
                                              alt74 = 1
                  Severity: Critical
                  Found in BaseTools/Source/Python/Eot/CParser.py - About 1 day to fix

                    Consider simplifying this complex logical expression.
                    Open

                                        if LA74 == 64:
                                            LA74_191 = self.input.LA(3)
                    
                                            if (self.synpred142()) :
                                                alt74 = 1
                    Severity: Critical
                    Found in BaseTools/Source/Python/Eot/CParser.py - About 1 day to fix

                      File InfPomAlignment.py has 610 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      ## @file InfPomAlignment.py
                      # This file contained the adapter for convert INF parser object to POM Object
                      #
                      # Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
                      #
                      Severity: Major
                      Found in BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignment.py - About 1 day to fix

                        File pyassem.py has 609 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        """A flow graph representation for Python bytecode"""
                        
                        import dis
                        import types
                        import sys
                        Severity: Major
                        Found in AppPkg/Applications/Python/Python-2.7.2/Lib/compiler/pyassem.py - About 1 day to fix

                          File pyassem.py has 609 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          """A flow graph representation for Python bytecode"""
                          
                          import dis
                          import types
                          import sys
                          Severity: Major
                          Found in vector-uefi/fd/efi/StdLib/lib/python.27/compiler/pyassem.py - About 1 day to fix

                            Function AnalyzeDscPcd has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring.
                            Open

                            def AnalyzeDscPcd(Setting, PcdType, DataType=''):
                                Setting = Setting.strip()
                                # There might be escaped quote in a string: \", \\\"
                                Data = Setting.replace('\\\\', '//').replace('\\\"', '\\\'')
                                # There might be '|' in string and in ( ... | ... ), replace it with '-'
                            Severity: Minor
                            Found in BaseTools/Source/Python/Common/Misc.py - About 1 day 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 __InitializeInf__ has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring.
                            Open

                                def __InitializeInf__ (self, BaseAddress = None, BlockSize= None, BlockNum = None, ErasePloarity='1', VtfDict=None) :
                                    #
                                    # Create FV inf file
                                    #
                                    self.InfFileName = os.path.join(GenFdsGlobalVariable.FvDir,
                            Severity: Minor
                            Found in BaseTools/Source/Python/GenFds/Fv.py - About 1 day 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 uname has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring.
                            Open

                            def uname():
                            
                                """ Fairly portable uname interface. Returns a tuple
                                    of strings (system,node,release,version,machine,processor)
                                    identifying the underlying platform.
                            Severity: Minor
                            Found in AppPkg/Applications/Python/Python-2.7.2/Lib/platform.py - About 1 day 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 process has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring.
                            Open

                            def process(filename, list):
                                print "-"*70
                                assert list # if this fails, readwarnings() is broken
                                try:
                                    fp = open(filename)
                            Severity: Minor
                            Found in AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/fixdiv.py - About 1 day 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 action has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring.
                            Open

                                def action(self):
                                    """Return a code indicating the update status of this file.
                            
                                    The possible return values are:
                            
                            Severity: Minor
                            Found in AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/rcvs.py - About 1 day 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 run has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring.
                            Open

                                def run(self):
                                    tokenize.tokenize(self.getline, self.tokeneater)
                                    # Remove trailing empty lines.
                                    lines = self.lines
                                    while lines and lines[-1] == "\n":
                            Severity: Minor
                            Found in AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/reindent.py - About 1 day 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 _read has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring.
                            Open

                                def _read(self, fp, fpname):
                                    """Parse a sectioned setup file.
                            
                                    The sections in setup file contains a title line at the top,
                                    indicated by a name in square brackets (`[]'), plus key/value
                            Severity: Minor
                            Found in AppPkg/Applications/Python/Python-2.7.2/Lib/ConfigParser.py - About 1 day 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