JrGoodle/clowder

View on GitHub

Showing 11 of 11 total issues

GitOffline has 98 functions (exceeds 80 allowed). Consider refactoring.
Open

class GitOffline:

    @classmethod
    def get_remote_fetch_url(cls, path: Path, remote: str) -> Optional[str]:
        remotes = GitOffline.get_remotes_info(path)
Severity: Major
Found in clowder/util/git/offline.py - About 5 hrs to fix

    Function herd has a Cognitive Complexity of 37 (exceeds 30 allowed). Consider refactoring.
    Open

        def herd(self, branch: Optional[str] = None, tag: Optional[str] = None,
                 depth: Optional[int] = None, rebase: bool = False) -> None:
            """Clone project or update latest from upstream
    
            :param Optional[str] branch: Branch to attempt to herd
    Severity: Minor
    Found in clowder/controller/project_repo.py - About 1 hr 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 submodule_update has 12 arguments (exceeds 8 allowed). Consider refactoring.
    Open

        def submodule_update(cls, path: Path, init: bool = False, depth: Optional[int] = None, single_branch: bool = False,
    Severity: Major
    Found in clowder/util/git/online.py - About 1 hr to fix

      Function fetch has 11 arguments (exceeds 8 allowed). Consider refactoring.
      Open

          def fetch(self, prune: bool = False, prune_tags: bool = False, tags: bool = False,
      Severity: Major
      Found in clowder/util/git/model/repo.py - About 50 mins to fix

        Function run has 11 arguments (exceeds 8 allowed). Consider refactoring.
        Open

        def run(command: Union[str, List[str]], cwd: Path = Path.cwd(), check: bool = True,
        Severity: Major
        Found in clowder/util/command.py - About 50 mins to fix

          Function fetch has 11 arguments (exceeds 8 allowed). Consider refactoring.
          Open

              def fetch(cls, path: Path, prune: bool = False, prune_tags: bool = False, tags: bool = False,
          Severity: Major
          Found in clowder/util/git/online.py - About 50 mins to fix

            Function pull has 11 arguments (exceeds 8 allowed). Consider refactoring.
            Open

                def pull(cls, path: Path, remote: Optional[str] = None, branch: Optional[str] = None,
            Severity: Major
            Found in clowder/util/git/online.py - About 50 mins to fix

              Function fetch has 10 arguments (exceeds 8 allowed). Consider refactoring.
              Open

                  def fetch(self, prune: bool = False, prune_tags: bool = False, tags: bool = False,
              Severity: Major
              Found in clowder/util/git/model/remote.py - About 45 mins to fix

                Function submodule_update has 10 arguments (exceeds 8 allowed). Consider refactoring.
                Open

                    def submodule_update(self, init: bool = False, depth: Optional[int] = None, single_branch: bool = False,
                Severity: Major
                Found in clowder/util/git/model/repo.py - About 45 mins to fix

                  Function clone has 10 arguments (exceeds 8 allowed). Consider refactoring.
                  Open

                      def clone(cls, path: Path, url: str, depth: Optional[int] = None, branch: Optional[str] = None,
                  Severity: Major
                  Found in clowder/util/git/online.py - About 45 mins to fix

                    Function pull has 9 arguments (exceeds 8 allowed). Consider refactoring.
                    Open

                        def pull(self, remote: Optional[str] = None, branch: Optional[str] = None,
                    Severity: Major
                    Found in clowder/util/git/model/repo.py - About 35 mins to fix
                      Severity
                      Category
                      Status
                      Source
                      Language