hackedteam/vector-edk

View on GitHub

Showing 9,525 of 13,510 total issues

Function direct_abstract_declarator has a Cognitive Complexity of 216 (exceeds 5 allowed). Consider refactoring.
Open

    def direct_abstract_declarator(self, ):

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

# Author: Steven J. Bethard <steven.bethard@gmail.com>.

"""Command-line parsing library

This module is an optparse-inspired command-line parsing library that:
Severity: Major
Found in AppPkg/Applications/Python/Python-2.7.2/Lib/argparse.py - About 4 days to fix

    File argparse.py has 1620 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    # Author: Steven J. Bethard <steven.bethard@gmail.com>.
    
    """Command-line parsing library
    
    This module is an optparse-inspired command-line parsing library that:
    Severity: Major
    Found in vector-uefi/fd/efi/StdLib/lib/python.27/argparse.py - About 4 days to fix

      Function CollectPlatformDynamicPcds has a Cognitive Complexity of 210 (exceeds 5 allowed). Consider refactoring.
      Open

          def CollectPlatformDynamicPcds(self):
              # for gathering error information
              NoDatumTypePcdList = set()
      
              self._GuidValue = {}
      Severity: Minor
      Found in BaseTools/Source/Python/AutoGen/AutoGen.py - About 4 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 locale.py has 1577 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      """ Locale support.
      
          The module provides low-level access to the C lib's locale APIs
          and adds high level number formatting APIs as well as a locale
          aliasing engine to complement these.
      Severity: Major
      Found in AppPkg/Applications/Python/Python-2.7.2/Lib/locale.py - About 4 days to fix

        File locale.py has 1577 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        """ Locale support.
        
            The module provides low-level access to the C lib's locale APIs
            and adds high level number formatting APIs as well as a locale
            aliasing engine to complement these.
        Severity: Major
        Found in vector-uefi/fd/efi/StdLib/lib/python.27/locale.py - About 4 days to fix

          File texi2html.py has 1558 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          #! /usr/bin/env python
          
          # Convert GNU texinfo files into HTML, one file per node.
          # Based on Texinfo 2.14.
          # Usage: texi2html [-d] [-d] [-c] inputfile outputdirectory
          Severity: Major
          Found in AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/texi2html.py - About 4 days to fix

            Function abstract_declarator has a Cognitive Complexity of 202 (exceeds 5 allowed). Consider refactoring.
            Open

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

                def abstract_declarator(self, ):
            
                    abstract_declarator_StartIndex = self.input.index()
                    try:
                        try:
            Severity: Minor
            Found in BaseTools/Source/Python/Eot/CParser.py - About 4 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

            Method GetOptimum has a Cognitive Complexity of 215 (exceeds 20 allowed). Consider refactoring.
            Open

                    UInt32 GetOptimum(UInt32 position, out UInt32 backRes)
                    {
                        if (_optimumEndIndex != _optimumCurrentIndex)
                        {
                            UInt32 lenRes = _optimum[_optimumCurrentIndex].PosPrev - _optimumCurrentIndex;
            Severity: Minor
            Found in vector-uefi/insyde/7zip/CS/7zip/Compress/LZMA/LzmaEncoder.cs - About 4 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

            Method GetOptimum has a Cognitive Complexity of 199 (exceeds 5 allowed). Consider refactoring.
            Open

                int GetOptimum(int position) throws IOException
                {
                    if (_optimumEndIndex != _optimumCurrentIndex)
                    {
                        int lenRes = _optimum[_optimumCurrentIndex].PosPrev - _optimumCurrentIndex;
            Severity: Minor
            Found in vector-uefi/insyde/7zip/Java/SevenZip/Compression/LZMA/Encoder.java - About 4 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 minidom.py has 1515 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            """\
            minidom.py -- a lightweight DOM implementation.
            
            parse("foo.xml")
            
            Severity: Major
            Found in AppPkg/Applications/Python/Python-2.7.2/Lib/xml/dom/minidom.py - About 4 days to fix

              File minidom.py has 1515 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              """\
              minidom.py -- a lightweight DOM implementation.
              
              parse("foo.xml")
              
              Severity: Major
              Found in vector-uefi/fd/efi/StdLib/lib/python.27/xml/dom/minidom.py - About 4 days to fix

                File _pyio.py has 1507 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                """
                Python implementation of the io module.
                """
                
                from __future__ import (print_function, unicode_literals)
                Severity: Major
                Found in AppPkg/Applications/Python/Python-2.7.2/Lib/_pyio.py - About 4 days to fix

                  File _pyio.py has 1507 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  """
                  Python implementation of the io module.
                  """
                  
                  from __future__ import (print_function, unicode_literals)
                  Severity: Major
                  Found in vector-uefi/fd/efi/StdLib/lib/python.27/_pyio.py - About 4 days to fix

                    File difflib.py has 1469 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    #! /usr/bin/env python
                    
                    """
                    Module difflib -- helpers for computing deltas between objects.
                    
                    Severity: Major
                    Found in AppPkg/Applications/Python/Python-2.7.2/Lib/difflib.py - About 3 days to fix

                      File difflib.py has 1469 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      #! /usr/bin/env python
                      
                      """
                      Module difflib -- helpers for computing deltas between objects.
                      
                      Severity: Major
                      Found in vector-uefi/fd/efi/StdLib/lib/python.27/difflib.py - About 3 days to fix

                        File cookielib.py has 1378 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        """HTTP cookie handling for web clients.
                        
                        This module has (now fairly distant) origins in Gisle Aas' Perl module
                        HTTP::Cookies, from the libwww-perl library.
                        
                        Severity: Major
                        Found in AppPkg/Applications/Python/Python-2.7.2/Lib/cookielib.py - About 3 days to fix

                          File cookielib.py has 1378 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          """HTTP cookie handling for web clients.
                          
                          This module has (now fairly distant) origins in Gisle Aas' Perl module
                          HTTP::Cookies, from the libwww-perl library.
                          
                          Severity: Major
                          Found in vector-uefi/fd/efi/StdLib/lib/python.27/cookielib.py - About 3 days to fix

                            Function CreateAsBuiltInf has a Cognitive Complexity of 177 (exceeds 5 allowed). Consider refactoring.
                            Open

                                def CreateAsBuiltInf(self):
                                    if self.IsAsBuiltInfCreated:
                                        return
                                        
                                    # Skip the following code for EDK I inf
                            Severity: Minor
                            Found in BaseTools/Source/Python/AutoGen/AutoGen.py - About 3 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