hackedteam/vector-edk

View on GitHub

Showing 9,525 of 13,510 total issues

File mimetypes.py has 498 lines of code (exceeds 250 allowed). Consider refactoring.
Open

"""Guess the MIME type of a file.

This module defines two useful functions:

guess_type(url, strict=1) -- guess the MIME type and encoding of a URL.
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/mimetypes.py - About 7 hrs to fix

    File unparse.py has 497 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    "Usage: unparse.py <path to source file>"
    import sys
    import ast
    import cStringIO
    import os
    Severity: Minor
    Found in AppPkg/Applications/Python/Python-2.7.2/Demo/parser/unparse.py - About 7 hrs to fix

      File site.py has 497 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      """Append module search paths for third-party packages to sys.path.
      
      ****************************************************************
      * This module is automatically imported during initialization. *
      ****************************************************************
      Severity: Minor
      Found in AppPkg/Applications/Python/Python-2.7.2/Lib/site.py - About 7 hrs to fix

        Method main has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring.
        Open

            public static void main(String[] args) throws Exception
            {
                System.out.println("\nLZMA (Java) 4.61  2008-11-23\n");
                
                if (args.length < 1)
        Severity: Minor
        Found in vector-uefi/insyde/7zip/Java/SevenZip/LzmaAlone.java - About 7 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 SetPcds has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring.
        Open

            def SetPcds(self, PcdContent, KeysList = None, PackageInfo = None):
                
                if GlobalData.gIS_BINARY_INF:
                    self.SetAsBuildPcds(PcdContent, KeysList, PackageInfo)
                    return True
        Severity: Minor
        Found in BaseTools/Source/Python/UPT/Object/Parser/InfPcdObject.py - About 7 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 _GetDepex has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring.
        Open

            def _GetDepex(self):
                if self._Depex == None:
                    self._Depex = tdict(False, 2)
                    RecordList = self._RawData[MODEL_EFI_DEPEX, self._Arch]
                    
        Severity: Minor
        Found in BaseTools/Source/Python/Workspace/WorkspaceDatabase.py - About 7 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 _BuildPlatform has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring.
        Open

            def _BuildPlatform(self):
                for BuildTarget in self.BuildTargetList:
                    GlobalData.gGlobalDefines['TARGET'] = BuildTarget
                    for ToolChain in self.ToolChainList:
                        GlobalData.gGlobalDefines['TOOLCHAIN'] = ToolChain
        Severity: Minor
        Found in BaseTools/Source/Python/build/build.py - About 7 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 DisPatchPei has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring.
        Open

            def DisPatchPei(self, Db):
                IsInstalled = False
                for FfsID in self.UnDispatchedFfsDict:
                    CouldBeLoaded = True
                    DepexString = ''
        Severity: Minor
        Found in BaseTools/Source/Python/Eot/FvImage.py - About 7 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 docclass has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring.
        Open

            def docclass(self, object, name=None, mod=None, funcs={}, classes={},
                         *ignored):
                """Produce HTML documentation for a class object."""
                realname = object.__name__
                name = name or realname
        Severity: Minor
        Found in AppPkg/Applications/Python/PyMod-2.7.2/Lib/pydoc.py - About 7 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 expandvars has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring.
        Open

        def expandvars(path):
            """Expand shell variables of the forms $var, ${var} and %var%.
        
            Unknown variables are left unchanged."""
            if '$' not in path and '%' not in path:
        Severity: Minor
        Found in AppPkg/Applications/Python/PyMod-2.7.2/Lib/ntpath.py - About 7 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 test has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring.
        Open

            def test(self):
        
                l1 = range(100)
                for i in xrange(self.rounds):
                    for i in l1:
        Severity: Minor
        Found in AppPkg/Applications/Python/Python-2.7.2/Tools/pybench/Constructs.py - About 7 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 emparse_list has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring.
        Open

        def emparse_list(fp, sub):
            data = fp.read()
            res = emparse_list_from.search(data)
            if res is None:
                from_index = len(data)
        Severity: Minor
        Found in AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/mailerdaemon.py - About 7 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 expandvars has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring.
        Open

        def expandvars(path):
            """Expand shell variables of the forms $var, ${var} and %var%.
        
            Unknown variables are left unchanged."""
            if '$' not in path and '%' not in path:
        Severity: Minor
        Found in AppPkg/Applications/Python/Python-2.7.2/Lib/ntpath.py - About 7 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 docclass has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring.
        Open

            def docclass(self, object, name=None, mod=None, funcs={}, classes={},
                         *ignored):
                """Produce HTML documentation for a class object."""
                realname = object.__name__
                name = name or realname
        Severity: Minor
        Found in AppPkg/Applications/Python/Python-2.7.2/Lib/pydoc.py - About 7 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 _normalized_cookie_tuples has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring.
        Open

            def _normalized_cookie_tuples(self, attrs_set):
                """Return list of tuples containing normalised cookie information.
        
                attrs_set is the list of lists of key,value pairs extracted from
                the Set-Cookie or Set-Cookie2 headers.
        Severity: Minor
        Found in AppPkg/Applications/Python/Python-2.7.2/Lib/cookielib.py - About 7 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 _format_actions_usage has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring.
        Open

            def _format_actions_usage(self, actions, groups):
                # find group indices and identify actions in groups
                group_actions = set()
                inserts = {}
                for group in groups:
        Severity: Minor
        Found in AppPkg/Applications/Python/Python-2.7.2/Lib/argparse.py - About 7 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 expandvars has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring.
        Open

        def expandvars(path):
            """Expand shell variables of the forms $var, ${var} and %var%.
        
            Unknown variables are left unchanged."""
            if '$' not in path and '%' not in path:
        Severity: Minor
        Found in vector-uefi/fd/efi/StdLib/lib/python.27/ntpath.py - About 7 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 docclass has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring.
        Open

            def docclass(self, object, name=None, mod=None, funcs={}, classes={},
                         *ignored):
                """Produce HTML documentation for a class object."""
                realname = object.__name__
                name = name or realname
        Severity: Minor
        Found in vector-uefi/fd/efi/StdLib/lib/python.27/pydoc.py - About 7 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 _normalized_cookie_tuples has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring.
        Open

            def _normalized_cookie_tuples(self, attrs_set):
                """Return list of tuples containing normalised cookie information.
        
                attrs_set is the list of lists of key,value pairs extracted from
                the Set-Cookie or Set-Cookie2 headers.
        Severity: Minor
        Found in vector-uefi/fd/efi/StdLib/lib/python.27/cookielib.py - About 7 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 _format_actions_usage has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring.
        Open

            def _format_actions_usage(self, actions, groups):
                # find group indices and identify actions in groups
                group_actions = set()
                inserts = {}
                for group in groups:
        Severity: Minor
        Found in vector-uefi/fd/efi/StdLib/lib/python.27/argparse.py - About 7 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

        Severity
        Category
        Status
        Source
        Language