hackedteam/vector-edk

View on GitHub

Showing 9,525 of 13,510 total issues

Function __InfParse__ has a Cognitive Complexity of 82 (exceeds 5 allowed). Consider refactoring.
Open

    def __InfParse__(self, Dict = {}):

        GenFdsGlobalVariable.VerboseLogger( " Begine parsing INf file : %s" %self.InfFileName)

        self.InfFileName = self.InfFileName.replace('$(WORKSPACE)', '')
Severity: Minor
Found in BaseTools/Source/Python/GenFds/FfsInfStatement.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 _parse_known_args has a Cognitive Complexity of 82 (exceeds 5 allowed). Consider refactoring.
Open

    def _parse_known_args(self, arg_strings, namespace):
        # replace arg strings that are file references
        if self.fromfile_prefix_chars is not None:
            arg_strings = self._read_args_from_files(arg_strings)
Severity: Minor
Found in AppPkg/Applications/Python/Python-2.7.2/Lib/argparse.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 _compile_info has a Cognitive Complexity of 82 (exceeds 5 allowed). Consider refactoring.
Open

def _compile_info(code, pattern, flags):
    # internal: compile an info block.  in the current version,
    # this contains min/max pattern width, and an optional literal
    # prefix or a character map
    lo, hi = pattern.getwidth()
Severity: Minor
Found in AppPkg/Applications/Python/Python-2.7.2/Lib/sre_compile.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 _parse_known_args has a Cognitive Complexity of 82 (exceeds 5 allowed). Consider refactoring.
Open

    def _parse_known_args(self, arg_strings, namespace):
        # replace arg strings that are file references
        if self.fromfile_prefix_chars is not None:
            arg_strings = self._read_args_from_files(arg_strings)
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/argparse.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 _compile_info has a Cognitive Complexity of 82 (exceeds 5 allowed). Consider refactoring.
Open

def _compile_info(code, pattern, flags):
    # internal: compile an info block.  in the current version,
    # this contains min/max pattern width, and an optional literal
    # prefix or a character map
    lo, hi = pattern.getwidth()
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/sre_compile.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

File ModuleSurfaceAreaXml.py has 706 lines of code (exceeds 250 allowed). Consider refactoring.
Open

## @file
# This file is used to parse a Module file of .PKG file
#
# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
#
Severity: Major
Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py - About 1 day to fix

    File pytree.py has 706 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    # Copyright 2006 Google, Inc. All Rights Reserved.
    # Licensed to PSF under a Contributor Agreement.
    
    """
    Python parse tree definitions.
    Severity: Major
    Found in AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/pytree.py - About 1 day to fix

      File pytree.py has 706 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      # Copyright 2006 Google, Inc. All Rights Reserved.
      # Licensed to PSF under a Contributor Agreement.
      
      """
      Python parse tree definitions.
      Severity: Major
      Found in vector-uefi/fd/efi/StdLib/lib/python.27/lib2to3/pytree.py - About 1 day to fix

        Function GenSection has a Cognitive Complexity of 81 (exceeds 5 allowed). Consider refactoring.
        Open

            def GenSection(self, OutputPath, ModuleName, SecNum, KeyStringList, FfsInf = None, Dict = {}):
                #
                # Generate all section
                #
                self.KeyStringList = KeyStringList
        Severity: Minor
        Found in BaseTools/Source/Python/GenFds/GuidSection.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 _mdiff has a Cognitive Complexity of 81 (exceeds 5 allowed). Consider refactoring.
        Open

        def _mdiff(fromlines, tolines, context=None, linejunk=None,
                   charjunk=IS_CHARACTER_JUNK):
            r"""Returns generator yielding marked up from/to side by side differences.
        
            Arguments:
        Severity: Minor
        Found in AppPkg/Applications/Python/Python-2.7.2/Lib/difflib.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 _mdiff has a Cognitive Complexity of 81 (exceeds 5 allowed). Consider refactoring.
        Open

        def _mdiff(fromlines, tolines, context=None, linejunk=None,
                   charjunk=IS_CHARACTER_JUNK):
            r"""Returns generator yielding marked up from/to side by side differences.
        
            Arguments:
        Severity: Minor
        Found in vector-uefi/fd/efi/StdLib/lib/python.27/difflib.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

        File Lookups.py has 700 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        from pybench import Test
        
        class SpecialClassAttribute(Test):
        
            version = 2.0
        Severity: Major
        Found in AppPkg/Applications/Python/Python-2.7.2/Tools/pybench/Lookups.py - About 1 day to fix

          File CommonXml.py has 698 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          ## @file
          # This file is used to parse a PCD file of .PKG file
          #
          # Copyright (c) 2011 - 2013, Intel Corporation. All rights reserved.<BR>
          #
          Severity: Major
          Found in BaseTools/Source/Python/UPT/Xml/CommonXml.py - About 1 day to fix

            File FfsInfStatement.py has 695 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            ## @file
            # process FFS generation from INF statement
            #
            #  Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>
            #
            Severity: Major
            Found in BaseTools/Source/Python/GenFds/FfsInfStatement.py - About 1 day to fix

              Function makeunicodetype has a Cognitive Complexity of 79 (exceeds 5 allowed). Consider refactoring.
              Open

              def makeunicodetype(unicode, trace):
              
                  FILE = "Objects/unicodetype_db.h"
              
                  print "--- Preparing", FILE, "..."

              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 GenInfFile.py has 685 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              ## @file GenInfFile.py
              #
              # This file contained the logical of transfer package object to INF files.
              #
              # Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
              Severity: Major
              Found in BaseTools/Source/Python/UPT/GenMetaFile/GenInfFile.py - About 1 day to fix

                Function __init__ has a Cognitive Complexity of 78 (exceeds 5 allowed). Consider refactoring.
                Open

                    def __init__(self, filename, exclusions, eastasianwidth, unihan,
                                 derivednormalizationprops=None, linebreakprops=None,
                                 expand=1):
                        self.changed = []
                        file = open(filename)

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

                    def __pow__(self, other, modulo=None, context=None):
                        """Return self ** other [ % modulo].
                
                        With two arguments, compute self**other.
                
                Severity: Minor
                Found in AppPkg/Applications/Python/Python-2.7.2/Lib/decimal.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 __pow__ has a Cognitive Complexity of 78 (exceeds 5 allowed). Consider refactoring.
                Open

                    def __pow__(self, other, modulo=None, context=None):
                        """Return self ** other [ % modulo].
                
                        With two arguments, compute self**other.
                
                Severity: Minor
                Found in vector-uefi/fd/efi/StdLib/lib/python.27/decimal.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

                File StringTable.py has 684 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                ## @file
                # This file is used to define strings used in the UPT tool
                #
                # Copyright (c) 2011 - 2013, Intel Corporation. All rights reserved.<BR>
                #
                Severity: Major
                Found in BaseTools/Source/Python/UPT/Logger/StringTable.py - About 1 day to fix
                  Severity
                  Category
                  Status
                  Source
                  Language