hackedteam/vector-edk

View on GitHub

Showing 9,525 of 13,510 total issues

Function mimify_part has a Cognitive Complexity of 108 (exceeds 5 allowed). Consider refactoring.
Open

def mimify_part(ifile, ofile, is_mime):
    """Convert an 8bit part of a MIME mail message to quoted-printable."""
    has_cte = is_qp = is_base64 = 0
    multipart = None
    must_quote_body = must_quote_header = has_iso_chars = 0
Severity: Minor
Found in AppPkg/Applications/Python/Python-2.7.2/Lib/mimify.py - About 2 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 mimify_part has a Cognitive Complexity of 108 (exceeds 5 allowed). Consider refactoring.
Open

def mimify_part(ifile, ofile, is_mime):
    """Convert an 8bit part of a MIME mail message to quoted-printable."""
    has_cte = is_qp = is_base64 = 0
    multipart = None
    must_quote_body = must_quote_header = has_iso_chars = 0
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/mimify.py - About 2 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 dist.py has 891 lines of code (exceeds 250 allowed). Consider refactoring.
Open

"""distutils.dist

Provides the Distribution class, which represents the module distribution
being built/installed/distributed.
"""
Severity: Major
Found in AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/dist.py - About 2 days to fix

    File dist.py has 891 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    """distutils.dist
    
    Provides the Distribution class, which represents the module distribution
    being built/installed/distributed.
    """
    Severity: Major
    Found in vector-uefi/fd/efi/StdLib/lib/python.27/distutils/dist.py - About 2 days to fix

      Function mTokens has a Cognitive Complexity of 106 (exceeds 5 allowed). Consider refactoring.
      Open

          def mTokens(self):
              # C.g:1:8: ( T25 | T26 | T27 | T28 | T29 | T30 | T31 | T32 | T33 | T34 | T35 | T36 | T37 | T38 | T39 | T40 | T41 | T42 | T43 | T44 | T45 | T46 | T47 | T48 | T49 | T50 | T51 | T52 | T53 | T54 | T55 | T56 | T57 | T58 | T59 | T60 | T61 | T62 | T63 | T64 | T65 | T66 | T67 | T68 | T69 | T70 | T71 | T72 | T73 | T74 | T75 | T76 | T77 | T78 | T79 | T80 | T81 | T82 | T83 | T84 | T85 | T86 | T87 | T88 | T89 | T90 | T91 | T92 | T93 | T94 | T95 | T96 | T97 | T98 | T99 | T100 | T101 | T102 | T103 | T104 | T105 | T106 | T107 | T108 | T109 | T110 | T111 | T112 | T113 | T114 | T115 | T116 | T117 | IDENTIFIER | CHARACTER_LITERAL | STRING_LITERAL | HEX_LITERAL | DECIMAL_LITERAL | OCTAL_LITERAL | FLOATING_POINT_LITERAL | WS | BS | UnicodeVocabulary | COMMENT | LINE_COMMENT | LINE_COMMAND )
              alt35 = 106
              alt35 = self.dfa35.predict(self.input)
              if alt35 == 1:
      Severity: Minor
      Found in BaseTools/Source/Python/Ecc/CLexer.py - About 2 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 synpred4_fragment has a Cognitive Complexity of 106 (exceeds 5 allowed). Consider refactoring.
      Open

          def synpred4_fragment(self, ):
              # C.g:119:4: ( ( declaration_specifiers )? declarator ( declaration )* '{' )
              # C.g:119:6: ( declaration_specifiers )? declarator ( declaration )* '{'
              # C.g:119:6: ( declaration_specifiers )?
              alt102 = 2
      Severity: Minor
      Found in BaseTools/Source/Python/Ecc/CParser.py - About 2 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 mTokens has a Cognitive Complexity of 106 (exceeds 5 allowed). Consider refactoring.
      Open

          def mTokens(self):
              # C.g:1:8: ( T25 | T26 | T27 | T28 | T29 | T30 | T31 | T32 | T33 | T34 | T35 | T36 | T37 | T38 | T39 | T40 | T41 | T42 | T43 | T44 | T45 | T46 | T47 | T48 | T49 | T50 | T51 | T52 | T53 | T54 | T55 | T56 | T57 | T58 | T59 | T60 | T61 | T62 | T63 | T64 | T65 | T66 | T67 | T68 | T69 | T70 | T71 | T72 | T73 | T74 | T75 | T76 | T77 | T78 | T79 | T80 | T81 | T82 | T83 | T84 | T85 | T86 | T87 | T88 | T89 | T90 | T91 | T92 | T93 | T94 | T95 | T96 | T97 | T98 | T99 | T100 | T101 | T102 | T103 | T104 | T105 | T106 | T107 | T108 | T109 | T110 | T111 | T112 | T113 | T114 | T115 | T116 | T117 | IDENTIFIER | CHARACTER_LITERAL | STRING_LITERAL | HEX_LITERAL | DECIMAL_LITERAL | OCTAL_LITERAL | FLOATING_POINT_LITERAL | WS | BS | UnicodeVocabulary | COMMENT | LINE_COMMENT | LINE_COMMAND )
              alt35 = 106
              alt35 = self.dfa35.predict(self.input)
              if alt35 == 1:
      Severity: Minor
      Found in BaseTools/Source/Python/Eot/CLexer.py - About 2 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 synpred4_fragment has a Cognitive Complexity of 106 (exceeds 5 allowed). Consider refactoring.
      Open

          def synpred4_fragment(self, ):
              # C.g:119:4: ( ( declaration_specifiers )? declarator ( declaration )* '{' )
              # C.g:119:6: ( declaration_specifiers )? declarator ( declaration )* '{'
              # C.g:119:6: ( declaration_specifiers )?
              alt102 = 2
      Severity: Minor
      Found in BaseTools/Source/Python/Eot/CParser.py - About 2 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 DoxygenCheckFileHeader has a Cognitive Complexity of 105 (exceeds 5 allowed). Consider refactoring.
      Open

          def DoxygenCheckFileHeader(self):
              if EccGlobalData.gConfig.DoxygenCheckFileHeader == '1' or EccGlobalData.gConfig.DoxygenCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1':
                  EdkLogger.quiet("Checking Doxygen file header ...")
      
                  for Dirpath, Dirnames, Filenames in self.WalkTree():
      Severity: Minor
      Found in BaseTools/Source/Python/Ecc/Check.py - About 2 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

      Consider simplifying this complex logical expression.
      Open

                      if LA84 == IDENTIFIER:
                          LA84 = self.input.LA(2)
                          if LA84 == 62:
                              LA84_43 = self.input.LA(3)
      
      Severity: Critical
      Found in BaseTools/Source/Python/Ecc/CParser.py - About 2 days to fix

        Consider simplifying this complex logical expression.
        Open

                        if LA84 == IDENTIFIER:
                            LA84 = self.input.LA(2)
                            if LA84 == 62:
                                LA84_43 = self.input.LA(3)
        
        Severity: Critical
        Found in BaseTools/Source/Python/Eot/CParser.py - About 2 days to fix

          File makeunicodedata.py has 861 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          #
          # (re)generate unicode property and type databases
          #
          # this script converts a unicode 3.2 database file to
          # Modules/unicodedata_db.h, Modules/unicodename_db.h,

            File inspect.py has 861 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            # -*- coding: iso-8859-1 -*-
            """Get useful information from live Python objects.
            
            This module encapsulates the interface provided by the internal special
            attributes (func_*, co_*, im_*, tb_*, etc.) in a friendlier fashion.
            Severity: Major
            Found in AppPkg/Applications/Python/Python-2.7.2/Lib/inspect.py - About 2 days to fix

              File inspect.py has 861 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              # -*- coding: iso-8859-1 -*-
              """Get useful information from live Python objects.
              
              This module encapsulates the interface provided by the internal special
              attributes (func_*, co_*, im_*, tb_*, etc.) in a friendlier fashion.
              Severity: Major
              Found in vector-uefi/fd/efi/StdLib/lib/python.27/inspect.py - About 2 days to fix

                Function statement has a Cognitive Complexity of 103 (exceeds 5 allowed). Consider refactoring.
                Open

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

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

                """Test case implementation"""
                
                import collections
                import sys
                import functools
                Severity: Major
                Found in AppPkg/Applications/Python/Python-2.7.2/Lib/unittest/case.py - About 2 days to fix

                  File case.py has 857 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  """Test case implementation"""
                  
                  import collections
                  import sys
                  import functools
                  Severity: Major
                  Found in vector-uefi/fd/efi/StdLib/lib/python.27/unittest/case.py - About 2 days to fix

                    File mhlib.py has 854 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    """MH interface -- purely object-oriented (well, almost)
                    
                    Executive summary:
                    
                    import mhlib
                    Severity: Major
                    Found in AppPkg/Applications/Python/Python-2.7.2/Lib/mhlib.py - About 2 days to fix

                      File mhlib.py has 854 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      """MH interface -- purely object-oriented (well, almost)
                      
                      Executive summary:
                      
                      import mhlib
                      Severity: Major
                      Found in vector-uefi/fd/efi/StdLib/lib/python.27/mhlib.py - About 2 days to fix
                        Severity
                        Category
                        Status
                        Source
                        Language