hackedteam/vector-edk

View on GitHub

Showing 9,525 of 13,510 total issues

Function specifier_qualifier_list has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring.
Open

    def specifier_qualifier_list(self, ):

        specifier_qualifier_list_StartIndex = self.input.index()
        try:
            try:
Severity: Minor
Found in BaseTools/Source/Python/Eot/CParser.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 test has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring.
Open

def test():
    import sys, random, getopt
    args = sys.argv[1:]
    try:
        opts, args = getopt.getopt(args, '0123456789cdwq')
Severity: Minor
Found in AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/markov.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 compare has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring.
Open

def compare(local, remote, mode):
    print
    print "PWD =", repr(os.getcwd())
    sums_id = remote._send('sumlist')
    subdirs_id = remote._send('listsubdirs')
Severity: Minor
Found in AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/cmptree.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 _parse_doctype_subset has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring.
Open

    def _parse_doctype_subset(self, i, declstartpos):
        rawdata = self.rawdata
        n = len(rawdata)
        j = i
        while j < n:
Severity: Minor
Found in AppPkg/Applications/Python/Python-2.7.2/Lib/markupbase.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 getElementById has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring.
Open

    def getElementById(self, id):
        if id in self._id_cache:
            return self._id_cache[id]
        if not (self._elem_info or self._magic_id_count):
            return None
Severity: Minor
Found in AppPkg/Applications/Python/Python-2.7.2/Lib/xml/dom/minidom.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 get_platform has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring.
Open

def get_platform ():
    """Return a string that identifies the current platform.  This is used
    mainly to distinguish platform-specific build directories and
    platform-specific built distributions.  Typically includes the OS name
    and version and the architecture (as supplied by 'os.uname()'),
Severity: Minor
Found in AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/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 _parse_doctype_subset has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring.
Open

    def _parse_doctype_subset(self, i, declstartpos):
        rawdata = self.rawdata
        n = len(rawdata)
        j = i
        while j < n:
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/markupbase.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 getElementById has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring.
Open

    def getElementById(self, id):
        if id in self._id_cache:
            return self._id_cache[id]
        if not (self._elem_info or self._magic_id_count):
            return None
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/xml/dom/minidom.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 get_platform has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring.
Open

def get_platform ():
    """Return a string that identifies the current platform.  This is used
    mainly to distinguish platform-specific build directories and
    platform-specific built distributions.  Typically includes the OS name
    and version and the architecture (as supplied by 'os.uname()'),
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/distutils/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

Method Code has a Cognitive Complexity of 71 (exceeds 20 allowed). Consider refactoring.
Open

        public void Code(System.IO.Stream inStream, System.IO.Stream outStream,
            Int64 inSize, Int64 outSize, ICodeProgress progress)
        {
            Init(inStream, outStream);
Severity: Minor
Found in vector-uefi/insyde/7zip/CS/7zip/Compress/LZMA/LzmaDecoder.cs - 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 LA46 == 29 or LA46 == 30 or LA46 == 31 or LA46 == 32 or LA46 == 33 or LA46 == 34 or LA46 == 35 or LA46 == 36 or LA46 == 37 or LA46 == 38 or LA46 == 39 or LA46 == 40 or LA46 == 41 or LA46 == 42 or LA46 == 45 or LA46 == 46 or LA46 == 48 or LA46 == 49 or LA46 == 50 or LA46 == 51 or LA46 == 52 or LA46 == 53 or LA46 == 54 or LA46 == 55 or LA46 == 56 or LA46 == 57 or LA46 == 58 or LA46 == 59 or LA46 == 60 or LA46 == 61:
                    alt46 = 1
                elif LA46 == IDENTIFIER:
                    LA46_13 = self.input.LA(2)
Severity: Critical
Found in BaseTools/Source/Python/Ecc/CParser.py - About 1 day to fix

    Check has 60 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class Check(object):
        def __init__(self):
            pass
    
        # Check all required checkpoints
    Severity: Major
    Found in BaseTools/Source/Python/Ecc/Check.py - About 1 day to fix

      Consider simplifying this complex logical expression.
      Open

                          if LA74 == IDENTIFIER:
                              LA74_220 = self.input.LA(3)
      
                              if (self.synpred142()) :
                                  alt74 = 1
      Severity: Critical
      Found in BaseTools/Source/Python/Ecc/CParser.py - About 1 day to fix

        Consider simplifying this complex logical expression.
        Open

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

          Consider simplifying this complex logical expression.
          Open

                              if LA74 == IDENTIFIER:
                                  LA74_220 = self.input.LA(3)
          
                                  if (self.synpred142()) :
                                      alt74 = 1
          Severity: Critical
          Found in BaseTools/Source/Python/Eot/CParser.py - About 1 day to fix

            Unpickler has 60 functions (exceeds 20 allowed). Consider refactoring.
            Open

            class Unpickler:
            
                def __init__(self, file):
                    """This takes a file-like object for reading a pickle data stream.
            
            Severity: Major
            Found in AppPkg/Applications/Python/Python-2.7.2/Lib/pickle.py - About 1 day to fix

              Unpickler has 60 functions (exceeds 20 allowed). Consider refactoring.
              Open

              class Unpickler:
              
                  def __init__(self, file):
                      """This takes a file-like object for reading a pickle data stream.
              
              Severity: Major
              Found in vector-uefi/fd/efi/StdLib/lib/python.27/pickle.py - About 1 day to fix

                Function ParseHeaderCommentSection has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring.
                Open

                def ParseHeaderCommentSection(CommentList, FileName = None):
                    Abstract = ''
                    Description = ''
                    Copyright = ''
                    License = ''
                Severity: Minor
                Found in BaseTools/Source/Python/UPT/Library/CommentParsing.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 ParseCommonBinary has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring.
                Open

                    def ParseCommonBinary(self, CommonBinary, __SupArchList):
                        #
                        # Check common binary definitions
                        # Type | FileName | Target | Family | TagName | FeatureFlagExp
                        #
                Severity: Minor
                Found in BaseTools/Source/Python/UPT/Object/Parser/InfBinaryObject.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 __GenSimpleFileSection__ has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring.
                Open

                    def __GenSimpleFileSection__(self, Rule):
                        #
                        # Prepare the parameter of GenSection
                        #
                        FileList = []
                Severity: Minor
                Found in BaseTools/Source/Python/GenFds/FfsInfStatement.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

                Severity
                Category
                Status
                Source
                Language