hackedteam/vector-edk

View on GitHub

Showing 9,525 of 13,510 total issues

Function macro_statement has a Cognitive Complexity of 2417 (exceeds 5 allowed). Consider refactoring.
Open

    def macro_statement(self, ):

        macro_statement_StartIndex = self.input.index()
        try:
            try:
Severity: Minor
Found in BaseTools/Source/Python/Ecc/CParser.py - About 1 mo 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 macro_statement has a Cognitive Complexity of 2417 (exceeds 5 allowed). Consider refactoring.
Open

    def macro_statement(self, ):

        macro_statement_StartIndex = self.input.index()
        try:
            try:
Severity: Minor
Found in BaseTools/Source/Python/Eot/CParser.py - About 1 mo 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 CParser.py has 12293 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# $ANTLR 3.0.1 C.g 2010-02-23 09:58:53

from antlr3 import *
from antlr3.compat import set, frozenset
         
Severity: Major
Found in BaseTools/Source/Python/Ecc/CParser.py - About 1 mo to fix

    File CParser.py has 12293 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    # $ANTLR 3.0.1 C.g 2010-02-23 09:58:53
    
    from antlr3 import *
    from antlr3.compat import set, frozenset
             
    Severity: Major
    Found in BaseTools/Source/Python/Eot/CParser.py - About 1 mo to fix

      Function compound_statement has a Cognitive Complexity of 1428 (exceeds 5 allowed). Consider refactoring.
      Open

          def compound_statement(self, ):
      
              retval = self.compound_statement_return()
              retval.start = self.input.LT(1)
              compound_statement_StartIndex = self.input.index()
      Severity: Minor
      Found in BaseTools/Source/Python/Ecc/CParser.py - About 1 mo 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 compound_statement has a Cognitive Complexity of 1428 (exceeds 5 allowed). Consider refactoring.
      Open

          def compound_statement(self, ):
      
              retval = self.compound_statement_return()
              retval.start = self.input.LT(1)
              compound_statement_StartIndex = self.input.index()
      Severity: Minor
      Found in BaseTools/Source/Python/Eot/CParser.py - About 1 mo 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 pcidb.py has 9633 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      #!/usr/local/bin/python
      #CHIPSEC: Platform Security Assessment Framework
      #Copyright (c) 2010-2014, Intel Corporation
      # 
      #This program is free software; you can redistribute it and/or
      Severity: Major
      Found in vector-uefi/fd/tool/chipsec/hal/pcidb.py - About 1 mo to fix

        Function statement_list has a Cognitive Complexity of 1250 (exceeds 5 allowed). Consider refactoring.
        Open

            def statement_list(self, ):
        
                statement_list_StartIndex = self.input.index()
                try:
                    try:
        Severity: Minor
        Found in BaseTools/Source/Python/Ecc/CParser.py - About 3 wks 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 statement_list has a Cognitive Complexity of 1250 (exceeds 5 allowed). Consider refactoring.
        Open

            def statement_list(self, ):
        
                statement_list_StartIndex = self.input.index()
                try:
                    try:
        Severity: Minor
        Found in BaseTools/Source/Python/Eot/CParser.py - About 3 wks 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 assignment_expression has a Cognitive Complexity of 1249 (exceeds 5 allowed). Consider refactoring.
        Open

            def assignment_expression(self, ):
        
                assignment_expression_StartIndex = self.input.index()
                try:
                    try:
        Severity: Minor
        Found in BaseTools/Source/Python/Ecc/CParser.py - About 3 wks 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 assignment_expression has a Cognitive Complexity of 1249 (exceeds 5 allowed). Consider refactoring.
        Open

            def assignment_expression(self, ):
        
                assignment_expression_StartIndex = self.input.index()
                try:
                    try:
        Severity: Minor
        Found in BaseTools/Source/Python/Eot/CParser.py - About 3 wks 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 decimal.py has 4598 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        # Copyright (c) 2004 Python Software Foundation.
        # All rights reserved.
        
        # Written by Eric Price <eprice at tjhsst.edu>
        #    and Facundo Batista <facundo at taniquetil.com.ar>
        Severity: Major
        Found in AppPkg/Applications/Python/Python-2.7.2/Lib/decimal.py - About 1 wk to fix

          File decimal.py has 4598 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          # Copyright (c) 2004 Python Software Foundation.
          # All rights reserved.
          
          # Written by Eric Price <eprice at tjhsst.edu>
          #    and Facundo Batista <facundo at taniquetil.com.ar>
          Severity: Major
          Found in vector-uefi/fd/efi/StdLib/lib/python.27/decimal.py - About 1 wk to fix

            Function direct_declarator has a Cognitive Complexity of 469 (exceeds 5 allowed). Consider refactoring.
            Open

                def direct_declarator(self, ):
            
                    direct_declarator_StartIndex = self.input.index()
                    try:
                        try:
            Severity: Minor
            Found in BaseTools/Source/Python/Ecc/CParser.py - About 1 wk 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 direct_declarator has a Cognitive Complexity of 469 (exceeds 5 allowed). Consider refactoring.
            Open

                def direct_declarator(self, ):
            
                    direct_declarator_StartIndex = self.input.index()
                    try:
                        try:
            Severity: Minor
            Found in BaseTools/Source/Python/Eot/CParser.py - About 1 wk 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 test has a Cognitive Complexity of 391 (exceeds 5 allowed). Consider refactoring.
            Open

                def test(self):
            
                    a,b,c = 1,2,3
                    for i in xrange(self.rounds):
            
            Severity: Minor
            Found in AppPkg/Applications/Python/Python-2.7.2/Tools/pybench/Constructs.py - About 1 wk 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 FdfParser.py has 2744 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            ## @file
            # parse FDF file
            #
            #  Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
            #
            Severity: Major
            Found in BaseTools/Source/Python/GenFds/FdfParser.py - About 1 wk to fix

              Function _parse has a Cognitive Complexity of 355 (exceeds 5 allowed). Consider refactoring.
              Open

              def _parse(source, state):
                  # parse a simple pattern
                  subpattern = SubPattern(state)
              
                  # precompute constants into local variables
              Severity: Minor
              Found in AppPkg/Applications/Python/Python-2.7.2/Lib/sre_parse.py - About 1 wk 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 _parse has a Cognitive Complexity of 355 (exceeds 5 allowed). Consider refactoring.
              Open

              def _parse(source, state):
                  # parse a simple pattern
                  subpattern = SubPattern(state)
              
                  # precompute constants into local variables
              Severity: Minor
              Found in vector-uefi/fd/efi/StdLib/lib/python.27/sre_parse.py - About 1 wk 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 test has a Cognitive Complexity of 301 (exceeds 5 allowed). Consider refactoring.
              Open

                  def test(self):
              
                      for i in xrange(self.rounds):
                          try:
                              pass
              Severity: Minor
              Found in AppPkg/Applications/Python/Python-2.7.2/Tools/pybench/Exceptions.py - About 6 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