avocado-framework/avocado

View on GitHub

Showing 489 of 902 total issues

Function add has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def add(self, input_set, item, i=None, predecessor=None, causal=None):
Severity: Minor
Found in avocado/utils/external/spark.py - About 35 mins to fix

    Function reconfigure_dax_device has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def reconfigure_dax_device(
    Severity: Minor
    Found in avocado/utils/pmem.py - About 35 mins to fix

      Function vg_ramdisk_cleanup has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def vg_ramdisk_cleanup(
      Severity: Minor
      Found in avocado/utils/lv_utils.py - About 35 mins to fix

        Function __init__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def __init__(self, name, min_version=None, min_release=None, arch=None):
        Severity: Minor
        Found in avocado/utils/distro.py - About 35 mins to fix

          Function __init__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def __init__(
          Severity: Minor
          Found in avocado/utils/script.py - About 35 mins to fix

            Function get_asset_by_name has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def get_asset_by_name(cls, name, cache_dirs, expire=None, asset_hash=None):
            Severity: Minor
            Found in avocado/utils/asset.py - About 35 mins to fix

              Function lv_take_snapshot has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              def lv_take_snapshot(
              Severity: Minor
              Found in avocado/utils/lv_utils.py - About 35 mins to fix

                Function __init__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def __init__(self, name, level, disks, metadata, spare_disks=None):
                Severity: Minor
                Found in avocado/utils/softwareraid.py - About 35 mins to fix

                  Function parse_test has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      def parse_test(self, ok, num, name, directive, explanation):
                  Severity: Minor
                  Found in avocado/core/tapparser.py - About 35 mins to fix

                    Function __init__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        def __init__(self, reference, result, resolutions=None, info=None, origin=None):
                    Severity: Minor
                    Found in avocado/core/resolver.py - About 35 mins to fix

                      Function __init__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          def __init__(self, host, username, port=22, key=None, password=None):
                      Severity: Minor
                      Found in avocado/utils/network/hosts.py - About 35 mins to fix

                        Function __init__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            def __init__(
                        Severity: Minor
                        Found in avocado/core/nrunner/task.py - About 35 mins to fix

                          Function __init__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              def __init__(
                          Severity: Minor
                          Found in avocado/core/safeloader/imported.py - About 35 mins to fix

                            Function __init__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                def __init__(
                            Severity: Minor
                            Found in avocado/utils/partition.py - About 35 mins to fix

                              Function update_requirement_status has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                              def update_requirement_status(
                              Severity: Minor
                              Found in avocado/core/dependencies/requirements/cache/backends/sqlite.py - About 35 mins to fix

                                Function from_avocado_config has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                    def from_avocado_config(cls, kind, uri, *args, config=None, **kwargs):
                                Severity: Minor
                                Found in avocado/core/nrunner/runnable.py - About 35 mins to fix

                                  Function __init__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                      def __init__(self, kind, uri, *args, config=None, **kwargs):
                                  Severity: Minor
                                  Found in avocado/core/nrunner/runnable.py - About 35 mins to fix

                                    Function set_requirement has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                    def set_requirement(
                                    Severity: Minor
                                    Found in avocado/core/dependencies/requirements/cache/backends/sqlite.py - About 35 mins to fix

                                      Function find_files has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                      def find_files(path, recursive=True):
                                          pattern = "*_test.go"
                                          if recursive:
                                              matches = []
                                              for root, _, filenames in os.walk(path):
                                      Severity: Minor
                                      Found in optional_plugins/golang/avocado_golang/golang.py - About 35 mins 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_basic_workflow has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                          def test_basic_workflow(self):
                                              """
                                              Check the basic workflow works using ramdisk
                                              """
                                              ramdisk_filename = vg_ramdisk_dir = loop_device = None
                                      Severity: Minor
                                      Found in selftests/functional/lv_utils.py - About 35 mins 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