hackedteam/vector-edk

View on GitHub

Showing 9,525 of 13,510 total issues

File iobench.py has 450 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# -*- coding: utf-8 -*-
# This file should be kept compatible with both Python 2.6 and Python >= 3.0.

import time
import os
Severity: Minor
Found in AppPkg/Applications/Python/Python-2.7.2/Tools/iobench/iobench.py - About 6 hrs to fix

    File fractions.py has 450 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    # Originally contributed by Sjoerd Mullender.
    # Significantly modified by Jeffrey Yasskin <jyasskin at gmail.com>.
    
    """Rational, infinite-precision, real numbers."""
    
    Severity: Minor
    Found in AppPkg/Applications/Python/Python-2.7.2/Lib/fractions.py - About 6 hrs to fix

      File fractions.py has 450 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      # Originally contributed by Sjoerd Mullender.
      # Significantly modified by Jeffrey Yasskin <jyasskin at gmail.com>.
      
      """Rational, infinite-precision, real numbers."""
      
      Severity: Minor
      Found in vector-uefi/fd/efi/StdLib/lib/python.27/fractions.py - About 6 hrs to fix

        File mingw-gcc-build.py has 449 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        #!/usr/bin/env python
        
        ## @file
        #
        # Automation of instructions from:
        Severity: Minor
        Found in BaseTools/gcc/mingw-gcc-build.py - About 6 hrs to fix

          Function ParserInputFile has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring.
          Open

              def ParserInputFile (self):
                  count = 0        
                  for line in self.FileLinesList:
                      # Strip "\r\n" generated by readlines ().
                      line = line.strip()
          Severity: Minor
          Found in BaseTools/Source/Python/BPDG/GenVpd.py - About 6 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 LoadInfFile has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring.
          Open

              def LoadInfFile(self, Filename):
                  #
                  # Insert a record for file
                  #
                  Filename = NormPath(Filename)
          Severity: Minor
          Found in BaseTools/Source/Python/Common/InfClassObject.py - About 6 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 parameter_list has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring.
          Open

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

              def parameter_list(self, ):
          
                  parameter_list_StartIndex = self.input.index()
                  try:
                      try:
          Severity: Minor
          Found in BaseTools/Source/Python/Eot/CParser.py - About 6 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 GenerateSourceFileList has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring.
          Open

              def GenerateSourceFileList(self, SourceFileList, IncludeFileList):
                  EdkLogger.quiet("Generating source files list ... ")
                  mSourceFileList = []
                  mInfFileList = []
                  mDecFileList = []
          Severity: Minor
          Found in BaseTools/Source/Python/Eot/Eot.py - About 6 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 check has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring.
          Open

          def check(file):
              if os.path.isdir(file) and not os.path.islink(file):
                  if verbose:
                      print "listing directory", file
                  names = os.listdir(file)
          Severity: Minor
          Found in AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/cleanfuture.py - About 6 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 _parse_doctype_attlist has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring.
          Open

              def _parse_doctype_attlist(self, i, declstartpos):
                  rawdata = self.rawdata
                  name, j = self._scan_name(i, declstartpos)
                  c = rawdata[j:j+1]
                  if c == "":
          Severity: Minor
          Found in AppPkg/Applications/Python/Python-2.7.2/Lib/markupbase.py - About 6 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 read_setup_file has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring.
          Open

          def read_setup_file (filename):
              from distutils.sysconfig import \
                   parse_makefile, expand_makefile_vars, _variable_rx
              from distutils.text_file import TextFile
              from distutils.util import split_quoted
          Severity: Minor
          Found in AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/extension.py - About 6 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 uefi has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring.
          Open

          def uefi(argv):
          
              if 3 > len(argv):
                print usage
                return
          Severity: Minor
          Found in vector-uefi/fd/tool/chipsec/utilcmd/uefi_cmd.py - About 6 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 _parse_doctype_attlist has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring.
          Open

              def _parse_doctype_attlist(self, i, declstartpos):
                  rawdata = self.rawdata
                  name, j = self._scan_name(i, declstartpos)
                  c = rawdata[j:j+1]
                  if c == "":
          Severity: Minor
          Found in vector-uefi/fd/efi/StdLib/lib/python.27/markupbase.py - About 6 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 read_setup_file has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring.
          Open

          def read_setup_file (filename):
              from distutils.sysconfig import \
                   parse_makefile, expand_makefile_vars, _variable_rx
              from distutils.text_file import TextFile
              from distutils.util import split_quoted
          Severity: Minor
          Found in vector-uefi/fd/efi/StdLib/lib/python.27/distutils/extension.py - About 6 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

          Consider simplifying this complex logical expression.
          Open

                              if LA10 == 58:
                                  LA10_2 = self.input.LA(2)
          
                                  if (self.synpred15()) :
                                      alt10 = 3
          Severity: Critical
          Found in BaseTools/Source/Python/Ecc/CParser.py - About 6 hrs to fix

            Consider simplifying this complex logical expression.
            Open

                                if LA10 == 58:
                                    LA10_2 = self.input.LA(2)
            
                                    if (self.synpred15()) :
                                        alt10 = 3
            Severity: Critical
            Found in BaseTools/Source/Python/Eot/CParser.py - About 6 hrs to fix

              CCompiler has 48 functions (exceeds 20 allowed). Consider refactoring.
              Open

              class CCompiler:
                  """Abstract base class to define the interface that must be implemented
                  by real compiler classes.  Also has some utility methods used by
                  several compiler classes.
              
              Severity: Minor
              Found in AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/ccompiler.py - About 6 hrs to fix

                CCompiler has 48 functions (exceeds 20 allowed). Consider refactoring.
                Open

                class CCompiler:
                    """Abstract base class to define the interface that must be implemented
                    by real compiler classes.  Also has some utility methods used by
                    several compiler classes.
                
                Severity: Minor
                Found in vector-uefi/fd/efi/StdLib/lib/python.27/distutils/ccompiler.py - About 6 hrs to fix

                  File socket.py has 444 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  # Wrapper module for _socket, providing some additional facilities
                  # implemented in Python.
                  
                  """\
                  This module provides socket operations and some related functions.
                  Severity: Minor
                  Found in AppPkg/Applications/Python/Python-2.7.2/Lib/socket.py - About 6 hrs to fix
                    Severity
                    Category
                    Status
                    Source
                    Language