hackedteam/vector-edk

View on GitHub

Showing 9,525 of 13,510 total issues

Function transform_member has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring.
Open

    def transform_member(self, node, results):
        """Transform for imports of specific module elements. Replaces
           the module to be imported from with the appropriate new
           module.
        """
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/lib2to3/fixes/fix_urllib.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

Consider simplifying this complex logical expression.
Open

                            if LA43 == 29 or LA43 == 30 or LA43 == 31 or LA43 == 32 or LA43 == 33 or LA43 == 34 or LA43 == 35 or LA43 == 36 or LA43 == 37 or LA43 == 38 or LA43 == 39 or LA43 == 40 or LA43 == 41 or LA43 == 42 or LA43 == 45 or LA43 == 46 or LA43 == 48 or LA43 == 49 or LA43 == 50 or LA43 == 51 or LA43 == 52 or LA43 == 53 or LA43 == 54 or LA43 == 55 or LA43 == 56 or LA43 == 57 or LA43 == 61 or LA43 == 63 or LA43 == 64:
                                alt43 = 2
                            elif LA43 == IDENTIFIER:
                                LA43_37 = self.input.LA(3)
Severity: Critical
Found in BaseTools/Source/Python/Ecc/CParser.py - About 1 day to fix

    Consider simplifying this complex logical expression.
    Open

                            if LA17 == EOF or LA17 == IDENTIFIER or LA17 == 34 or LA17 == 35 or LA17 == 36 or LA17 == 37 or LA17 == 38 or LA17 == 39 or LA17 == 40 or LA17 == 41 or LA17 == 42 or LA17 == 45 or LA17 == 46 or LA17 == 48 or LA17 == 49 or LA17 == 50 or LA17 == 51 or LA17 == 52 or LA17 == 53 or LA17 == 54 or LA17 == 55 or LA17 == 56 or LA17 == 57 or LA17 == 58 or LA17 == 59 or LA17 == 60 or LA17 == 61 or LA17 == 63 or LA17 == 66:
                                alt17 = 2
                            elif LA17 == 62:
                                LA17_94 = self.input.LA(3)
    
    Severity: Critical
    Found in BaseTools/Source/Python/Ecc/CParser.py - About 1 day to fix

      Consider simplifying this complex logical expression.
      Open

                      if LA120 == 29 or LA120 == 30 or LA120 == 31 or LA120 == 32 or LA120 == 33 or LA120 == 34 or LA120 == 35 or LA120 == 36 or LA120 == 37 or LA120 == 38 or LA120 == 39 or LA120 == 40 or LA120 == 41 or LA120 == 42 or LA120 == 45 or LA120 == 46 or LA120 == 48 or LA120 == 49 or LA120 == 50 or LA120 == 51 or LA120 == 52 or LA120 == 53 or LA120 == 54 or LA120 == 55 or LA120 == 56 or LA120 == 57 or LA120 == 61 or LA120 == 63 or LA120 == 64:
                          alt120 = 2
                      elif LA120 == 58:
                          LA120_21 = self.input.LA(3)
      
      Severity: Critical
      Found in BaseTools/Source/Python/Ecc/CParser.py - About 1 day to fix

        Consider simplifying this complex logical expression.
        Open

                        if LA120 == 29 or LA120 == 30 or LA120 == 31 or LA120 == 32 or LA120 == 33 or LA120 == 34 or LA120 == 35 or LA120 == 36 or LA120 == 37 or LA120 == 38 or LA120 == 39 or LA120 == 40 or LA120 == 41 or LA120 == 42 or LA120 == 45 or LA120 == 46 or LA120 == 48 or LA120 == 49 or LA120 == 50 or LA120 == 51 or LA120 == 52 or LA120 == 53 or LA120 == 54 or LA120 == 55 or LA120 == 56 or LA120 == 57 or LA120 == 61 or LA120 == 63 or LA120 == 64:
                            alt120 = 2
                        elif LA120 == 58:
                            LA120_21 = self.input.LA(3)
        
        Severity: Critical
        Found in BaseTools/Source/Python/Eot/CParser.py - About 1 day to fix

          Consider simplifying this complex logical expression.
          Open

                                  if LA17 == EOF or LA17 == IDENTIFIER or LA17 == 34 or LA17 == 35 or LA17 == 36 or LA17 == 37 or LA17 == 38 or LA17 == 39 or LA17 == 40 or LA17 == 41 or LA17 == 42 or LA17 == 45 or LA17 == 46 or LA17 == 48 or LA17 == 49 or LA17 == 50 or LA17 == 51 or LA17 == 52 or LA17 == 53 or LA17 == 54 or LA17 == 55 or LA17 == 56 or LA17 == 57 or LA17 == 58 or LA17 == 59 or LA17 == 60 or LA17 == 61 or LA17 == 63 or LA17 == 66:
                                      alt17 = 2
                                  elif LA17 == 62:
                                      LA17_94 = self.input.LA(3)
          
          Severity: Critical
          Found in BaseTools/Source/Python/Eot/CParser.py - About 1 day to fix

            Consider simplifying this complex logical expression.
            Open

                                        if LA43 == 29 or LA43 == 30 or LA43 == 31 or LA43 == 32 or LA43 == 33 or LA43 == 34 or LA43 == 35 or LA43 == 36 or LA43 == 37 or LA43 == 38 or LA43 == 39 or LA43 == 40 or LA43 == 41 or LA43 == 42 or LA43 == 45 or LA43 == 46 or LA43 == 48 or LA43 == 49 or LA43 == 50 or LA43 == 51 or LA43 == 52 or LA43 == 53 or LA43 == 54 or LA43 == 55 or LA43 == 56 or LA43 == 57 or LA43 == 61 or LA43 == 63 or LA43 == 64:
                                            alt43 = 2
                                        elif LA43 == IDENTIFIER:
                                            LA43_37 = self.input.LA(3)
            
            Severity: Critical
            Found in BaseTools/Source/Python/Eot/CParser.py - About 1 day to fix

              TestCase has 58 functions (exceeds 20 allowed). Consider refactoring.
              Open

              class TestCase(object):
                  """A class whose instances are single test cases.
              
                  By default, the test code itself should be placed in a method named
                  'runTest'.
              Severity: Major
              Found in AppPkg/Applications/Python/Python-2.7.2/Lib/unittest/case.py - About 1 day to fix

                TestCase has 58 functions (exceeds 20 allowed). Consider refactoring.
                Open

                class TestCase(object):
                    """A class whose instances are single test cases.
                
                    By default, the test code itself should be placed in a method named
                    'runTest'.
                Severity: Major
                Found in vector-uefi/fd/efi/StdLib/lib/python.27/unittest/case.py - About 1 day to fix

                  File Constructs.py has 512 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

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

                    File SimpleXMLRPCServer.py has 511 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    """Simple XML-RPC Server.
                    
                    This module can be used to create simple XML-RPC servers
                    by creating a server and either installing functions, a
                    class instance, or by extending the SimpleXMLRPCServer
                    Severity: Major
                    Found in AppPkg/Applications/Python/Python-2.7.2/Lib/SimpleXMLRPCServer.py - About 1 day to fix

                      File SimpleXMLRPCServer.py has 511 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      """Simple XML-RPC Server.
                      
                      This module can be used to create simple XML-RPC servers
                      by creating a server and either installing functions, a
                      class instance, or by extending the SimpleXMLRPCServer
                      Severity: Major
                      Found in vector-uefi/fd/efi/StdLib/lib/python.27/SimpleXMLRPCServer.py - About 1 day to fix

                        Method GetMatches has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public int GetMatches(int[] distances) throws IOException
                            {
                                int lenLimit;
                                if (_pos + _matchMaxLen <= _streamPos)
                                    lenLimit = _matchMaxLen;
                        Severity: Minor
                        Found in vector-uefi/insyde/7zip/Java/SevenZip/Compression/LZ/BinTree.java - 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 find_binding has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring.
                        Open

                        def find_binding(name, node, package=None):
                            """ Returns the node which binds variable name, otherwise None.
                                If optional argument package is supplied, only imports will
                                be returned.
                                See test cases for examples."""
                        Severity: Minor
                        Found in AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixer_util.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 unmimify_part has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring.
                        Open

                        def unmimify_part(ifile, ofile, decode_base64 = 0):
                            """Convert a quoted-printable part of a MIME mail message to 8bit."""
                            multipart = None
                            quoted_printable = 0
                            is_base64 = 0
                        Severity: Minor
                        Found in AppPkg/Applications/Python/Python-2.7.2/Lib/mimify.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 find_binding has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring.
                        Open

                        def find_binding(name, node, package=None):
                            """ Returns the node which binds variable name, otherwise None.
                                If optional argument package is supplied, only imports will
                                be returned.
                                See test cases for examples."""
                        Severity: Minor
                        Found in vector-uefi/fd/efi/StdLib/lib/python.27/lib2to3/fixer_util.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 unmimify_part has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring.
                        Open

                        def unmimify_part(ifile, ofile, decode_base64 = 0):
                            """Convert a quoted-printable part of a MIME mail message to 8bit."""
                            multipart = None
                            quoted_printable = 0
                            is_base64 = 0
                        Severity: Minor
                        Found in vector-uefi/fd/efi/StdLib/lib/python.27/mimify.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 sysconfig.py has 507 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        """Provide access to Python's configuration information.
                        
                        """
                        import sys
                        import os
                        Severity: Major
                        Found in AppPkg/Applications/Python/Python-2.7.2/Lib/sysconfig.py - About 1 day to fix

                          File sysconfig.py has 507 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          """Provide access to Python's configuration information.
                          
                          """
                          import sys
                          import os
                          Severity: Major
                          Found in vector-uefi/fd/efi/StdLib/lib/python.27/sysconfig.py - About 1 day to fix

                            Method Main2 has 204 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    static int Main2(string[] args)
                                    {
                                        System.Console.WriteLine("\nLZMA# 4.61  2008-11-23\n");
                            
                                        if (args.Length == 0)
                            Severity: Major
                            Found in vector-uefi/insyde/7zip/CS/7zip/Compress/LzmaAlone/LzmaAlone.cs - About 1 day to fix
                              Severity
                              Category
                              Status
                              Source
                              Language