kressi/zmf-cli

View on GitHub

Showing 11 of 11 total issues

File zmf.py has 474 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import logging
import os
import sys

from itertools import groupby, islice
Severity: Minor
Found in src/zmfcli/zmf.py - About 7 hrs to fix

    ChangemanZmf has 22 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class ChangemanZmf:
        """
        Command line interface for ZMF REST API
    
        Available commands:
    Severity: Minor
    Found in src/zmfcli/zmf.py - About 2 hrs to fix

      Function get_package has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
      Open

          def get_package(
              self,
              applName: Optional[str] = None,
              packageTitle: Optional[str] = None,
              workChangeRequest: Optional[str] = None,
      Severity: Minor
      Found in src/zmfcli/zmf.py - About 2 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 get_components has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def get_components(
      Severity: Major
      Found in src/zmfcli/zmf.py - About 50 mins to fix

        Function build has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def build(
        Severity: Major
        Found in src/zmfcli/zmf.py - About 50 mins to fix

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

              def get_load_components(
          Severity: Minor
          Found in src/zmfcli/zmf.py - About 35 mins to fix

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

                def promote(
            Severity: Minor
            Found in src/zmfcli/zmf.py - About 35 mins to fix

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

                  def search_package(
                      self,
                      applName: str,
                      packageTitle: str,
                      workChangeRequest: Optional[str] = None,
              Severity: Minor
              Found in src/zmfcli/zmf.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 create_package has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

                  def create_package(
                      self,
                      applName: Optional[str] = None,
                      packageTitle: Optional[str] = None,
                      workChangeRequest: Optional[str] = None,
              Severity: Minor
              Found in src/zmfcli/zmf.py - About 25 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 get_components has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

                  def get_components(
                      self,
                      package: str,
                      componentType: Optional[str] = None,
                      component: Optional[str] = None,
              Severity: Minor
              Found in src/zmfcli/zmf.py - About 25 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 build has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

                  def build(
                      self,
                      package: str,
                      components: Iterable[str],
                      procedure: Optional[str] = None,
              Severity: Minor
              Found in src/zmfcli/zmf.py - About 25 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