hackedteam/vector-edk

View on GitHub

Showing 9,525 of 13,510 total issues

Function gui has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
Open

def gui():
    """Graphical interface (starts web server and pops up a control window)."""
    class GUI:
        def __init__(self, window, port=7464):
            self.window = window
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/pydoc.py - About 4 hrs 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 unified_diff has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
Open

def unified_diff(a, b, fromfile='', tofile='', fromfiledate='',
                 tofiledate='', n=3, lineterm='\n'):
    r"""
    Compare two sequences of lines; generate the delta as a unified diff.
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/difflib.py - About 4 hrs 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 gettarinfo has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
Open

Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/tarfile.py - About 4 hrs 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 link has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
Open

    def link(self,
             target_desc,
             objects,
             output_filename,
             output_dir=None,
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/distutils/msvc9compiler.py - About 4 hrs 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 getcomments has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
Open

def getcomments(object):
    """Get lines of comments immediately preceding an object's source code.

    Returns None when source can't be found.
    """
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/inspect.py - About 4 hrs 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 _fix has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
Open

    def _fix(self, context):
        """Round if it is necessary to keep self within prec precision.

        Rounds and fixes the exponent.  Does not raise on a sNaN.
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/decimal.py - About 4 hrs 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 __add__ has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
Open

    def __add__(self, other, context=None):
        """Returns self + other.

        -INF + INF (or the reverse) cause InvalidOperation errors.
        """
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/decimal.py - About 4 hrs 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 ModuleObject.py has 364 lines of code (exceeds 250 allowed). Consider refactoring.
Open

## @file
# This file is used to define a class object to describe a module
#
# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
#
Severity: Minor
Found in BaseTools/Source/Python/UPT/Object/POM/ModuleObject.py - About 4 hrs to fix

    File ssl.py has 363 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    # Wrapper module for _ssl, providing some additional facilities
    # implemented in Python.  Written by Bill Janssen.
    
    """\
    This module provides some more Pythonic support for SSL.
    Severity: Minor
    Found in AppPkg/Applications/Python/Python-2.7.2/Lib/ssl.py - About 4 hrs to fix

      File ssl.py has 363 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      # Wrapper module for _ssl, providing some additional facilities
      # implemented in Python.  Written by Bill Janssen.
      
      """\
      This module provides some more Pythonic support for SSL.
      Severity: Minor
      Found in vector-uefi/fd/efi/StdLib/lib/python.27/ssl.py - About 4 hrs to fix

        File ftpmirror.py has 362 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        #! /usr/bin/env python
        
        """Mirror a remote ftp subtree into a local directory tree.
        
        usage: ftpmirror [-v] [-q] [-i] [-m] [-n] [-r] [-s pat]
        Severity: Minor
        Found in AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/ftpmirror.py - About 4 hrs to fix

          File tokenize.py has 362 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          """Tokenization help for Python programs.
          
          generate_tokens(readline) is a generator that breaks a stream of
          text into Python tokens.  It accepts a readline-like method which is called
          repeatedly to get the next line of input (or "" for EOF).  It generates
          Severity: Minor
          Found in AppPkg/Applications/Python/Python-2.7.2/Lib/tokenize.py - About 4 hrs to fix

            File symbols.py has 362 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            """Module symbol-table generator"""
            
            from compiler import ast
            from compiler.consts import SC_LOCAL, SC_GLOBAL_IMPLICIT, SC_GLOBAL_EXPLICT, \
                SC_FREE, SC_CELL, SC_UNKNOWN
            Severity: Minor
            Found in AppPkg/Applications/Python/Python-2.7.2/Lib/compiler/symbols.py - About 4 hrs to fix

              File tokenize.py has 362 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              """Tokenization help for Python programs.
              
              generate_tokens(readline) is a generator that breaks a stream of
              text into Python tokens.  It accepts a readline-like method which is called
              repeatedly to get the next line of input (or "" for EOF).  It generates
              Severity: Minor
              Found in vector-uefi/fd/efi/StdLib/lib/python.27/tokenize.py - About 4 hrs to fix

                File symbols.py has 362 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                """Module symbol-table generator"""
                
                from compiler import ast
                from compiler.consts import SC_LOCAL, SC_GLOBAL_IMPLICIT, SC_GLOBAL_EXPLICT, \
                    SC_FREE, SC_CELL, SC_UNKNOWN
                Severity: Minor
                Found in vector-uefi/fd/efi/StdLib/lib/python.27/compiler/symbols.py - About 4 hrs to fix

                  Consider simplifying this complex logical expression.
                  Open

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

                    Consider simplifying this complex logical expression.
                    Open

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

                      Consider simplifying this complex logical expression.
                      Open

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

                        Consider simplifying this complex logical expression.
                        Open

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

                          TarInfo has 36 functions (exceeds 20 allowed). Consider refactoring.
                          Open

                          Severity: Minor
                          Found in AppPkg/Applications/Python/Python-2.7.2/Lib/tarfile.py - About 4 hrs to fix
                            Severity
                            Category
                            Status
                            Source
                            Language