hackedteam/vector-edk

View on GitHub

Showing 9,525 of 13,510 total issues

Function synpred86_fragment has a Cognitive Complexity of 65 (exceeds 5 allowed). Consider refactoring.
Open

    def synpred86_fragment(self, ):
        # C.g:330:4: ( declaration_specifiers ( declarator | abstract_declarator )* ( 'OPTIONAL' )? )
        # C.g:330:4: declaration_specifiers ( declarator | abstract_declarator )* ( 'OPTIONAL' )?
        self.following.append(self.FOLLOW_declaration_specifiers_in_synpred86994)
        self.declaration_specifiers()
Severity: Minor
Found in BaseTools/Source/Python/Ecc/CParser.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 iteration_statement has a Cognitive Complexity of 65 (exceeds 5 allowed). Consider refactoring.
Open

    def iteration_statement(self, ):

        iteration_statement_StartIndex = self.input.index()
        e = None
Severity: Minor
Found in BaseTools/Source/Python/Eot/CParser.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 synpred86_fragment has a Cognitive Complexity of 65 (exceeds 5 allowed). Consider refactoring.
Open

    def synpred86_fragment(self, ):
        # C.g:330:4: ( declaration_specifiers ( declarator | abstract_declarator )* ( 'OPTIONAL' )? )
        # C.g:330:4: declaration_specifiers ( declarator | abstract_declarator )* ( 'OPTIONAL' )?
        self.following.append(self.FOLLOW_declaration_specifiers_in_synpred86994)
        self.declaration_specifiers()
Severity: Minor
Found in BaseTools/Source/Python/Eot/CParser.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 docmodule has a Cognitive Complexity of 65 (exceeds 5 allowed). Consider refactoring.
Open

    def docmodule(self, object, name=None, mod=None, *ignored):
        """Produce HTML documentation for a module object."""
        name = object.__name__ # ignore the passed-in name
        try:
            all = object.__all__
Severity: Minor
Found in AppPkg/Applications/Python/PyMod-2.7.2/Lib/pydoc.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 checkit has a Cognitive Complexity of 65 (exceeds 5 allowed). Consider refactoring.
Open

def checkit(source, opts, morecmds=[]):
    """Check the LaTeX formatting in a sequence of lines.

    Opts is a mapping of options to option values if any:
        -m          munge parenthesis and brackets
Severity: Minor
Found in AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/texcheck.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 docmodule has a Cognitive Complexity of 65 (exceeds 5 allowed). Consider refactoring.
Open

    def docmodule(self, object, name=None, mod=None, *ignored):
        """Produce HTML documentation for a module object."""
        name = object.__name__ # ignore the passed-in name
        try:
            all = object.__all__
Severity: Minor
Found in AppPkg/Applications/Python/Python-2.7.2/Lib/pydoc.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 docmodule has a Cognitive Complexity of 65 (exceeds 5 allowed). Consider refactoring.
Open

    def docmodule(self, object, name=None, mod=None, *ignored):
        """Produce HTML documentation for a module object."""
        name = object.__name__ # ignore the passed-in name
        try:
            all = object.__all__
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/pydoc.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 Parsing.py has 593 lines of code (exceeds 250 allowed). Consider refactoring.
Open

## @file
# This file is used to define common parsing related functions used in parsing 
# INF/DEC/DSC process
#
# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
Severity: Major
Found in BaseTools/Source/Python/UPT/Library/Parsing.py - About 1 day to fix

    File random.py has 589 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    """Random variable generators.
    
        integers
        --------
               uniform within range
    Severity: Major
    Found in AppPkg/Applications/Python/Python-2.7.2/Lib/random.py - About 1 day to fix

      File random.py has 589 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      """Random variable generators.
      
          integers
          --------
                 uniform within range
      Severity: Major
      Found in vector-uefi/fd/efi/StdLib/lib/python.27/random.py - About 1 day to fix

        Function AddExternToDefineSec has a Cognitive Complexity of 64 (exceeds 5 allowed). Consider refactoring.
        Open

        def AddExternToDefineSec(SectionDict, Arch, ExternList):
            for ArchList, EntryPoint, UnloadImage, Constructor, Destructor, FFE, HelpStringList in ExternList:
                if Arch or ArchList:
                    if EntryPoint:
                        Statement = '%s = %s' % (DT.TAB_INF_DEFINES_ENTRY_POINT, EntryPoint)
        Severity: Minor
        Found in BaseTools/Source/Python/UPT/GenMetaFile/GenMetaFileMisc.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 InfPcdParser has a Cognitive Complexity of 64 (exceeds 5 allowed). Consider refactoring.
        Open

            def InfPcdParser(self, SectionString, InfSectionObject, FileName):
                KeysList = []
                PcdList   = []
                CommentsList = []          
                ValueList = [] 
        Severity: Minor
        Found in BaseTools/Source/Python/UPT/Parser/InfPcdSectionParser.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 CheckVer has a Cognitive Complexity of 64 (exceeds 5 allowed). Consider refactoring.
        Open

            def CheckVer(self, Ver, __SupArchList):
                #
                # Check Ver
                #
                for VerItem in Ver:
        Severity: Minor
        Found in BaseTools/Source/Python/UPT/Object/Parser/InfBinaryObject.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 unary_expression has a Cognitive Complexity of 64 (exceeds 5 allowed). Consider refactoring.
        Open

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

            def unary_expression(self, ):
        
                unary_expression_StartIndex = self.input.index()
                try:
                    try:
        Severity: Minor
        Found in BaseTools/Source/Python/Eot/CParser.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 ConfigParser.py has 582 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        """Configuration file parser.
        
        A setup file consists of sections, lead by a "[section]" header,
        and followed by "name: value" entries, with continuations and such in
        the style of RFC 822.
        Severity: Major
        Found in AppPkg/Applications/Python/Python-2.7.2/Lib/ConfigParser.py - About 1 day to fix

          File ConfigParser.py has 582 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          """Configuration file parser.
          
          A setup file consists of sections, lead by a "[section]" header,
          and followed by "name: value" entries, with continuations and such in
          the style of RFC 822.
          Severity: Major
          Found in vector-uefi/fd/efi/StdLib/lib/python.27/ConfigParser.py - About 1 day to fix

            File spark.py has 581 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            #  Copyright (c) 1998-2002 John Aycock
            #
            #  Permission is hereby granted, free of charge, to any person obtaining
            #  a copy of this software and associated documentation files (the
            #  "Software"), to deal in the Software without restriction, including
            Severity: Major
            Found in AppPkg/Applications/Python/Python-2.7.2/Parser/spark.py - About 1 day to fix

              File calendar.py has 580 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              """Calendar printing functions
              
              Note when comparing these calendars to the ones printed by cal(1): By
              default, these calendars have Monday as the first day of the week, and
              Sunday as the last (the European convention). Use setfirstweekday() to
              Severity: Major
              Found in AppPkg/Applications/Python/Python-2.7.2/Lib/calendar.py - About 1 day to fix

                File calendar.py has 580 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                """Calendar printing functions
                
                Note when comparing these calendars to the ones printed by cal(1): By
                default, these calendars have Monday as the first day of the week, and
                Sunday as the last (the European convention). Use setfirstweekday() to
                Severity: Major
                Found in vector-uefi/fd/efi/StdLib/lib/python.27/calendar.py - About 1 day to fix
                  Severity
                  Category
                  Status
                  Source
                  Language