cloudsmith-io/cloudsmith-cli

View on GitHub

Showing 97 of 166 total issues

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

def update_upstream(owner, repo, slug_perm, upstream_format, upstream_config):
Severity: Minor
Found in cloudsmith_cli/core/api/upstreams.py - About 35 mins to fix

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

    def add_tags(ctx, opts, owner_repo_package, tags, immutable):
    Severity: Minor
    Found in cloudsmith_cli/cli/commands/tags.py - About 35 mins to fix

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

      def ls(ctx, opts, owner, page, page_size):
      Severity: Minor
      Found in cloudsmith_cli/cli/commands/policy/vulnerability.py - About 35 mins to fix

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

        def update(ctx, opts, owner, identifier, policy_config_file):
        Severity: Minor
        Found in cloudsmith_cli/cli/commands/policy/vulnerability.py - About 35 mins to fix

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

          def list_upstreams(owner, repo, upstream_format, page, page_size):
          Severity: Minor
          Found in cloudsmith_cli/core/api/upstreams.py - About 35 mins to fix

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

            def list_entitlements(owner, repo, page, page_size, show_tokens):
            Severity: Minor
            Found in cloudsmith_cli/core/api/entitlements.py - About 35 mins to fix

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

              def repos(ctx, opts, owner_repo, page, page_size):
              Severity: Minor
              Found in cloudsmith_cli/cli/commands/list_.py - About 35 mins to fix

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

                def delete(ctx, opts, owner, identifier, yes):
                Severity: Minor
                Found in cloudsmith_cli/cli/commands/policy/vulnerability.py - About 35 mins to fix

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

                  def request_file_upload(
                  Severity: Minor
                  Found in cloudsmith_cli/core/api/files.py - About 35 mins to fix

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

                    def update(ctx, opts, owner, identifier, policy_config_file):
                    Severity: Minor
                    Found in cloudsmith_cli/cli/commands/policy/license.py - About 35 mins to fix

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

                      def add_quarantine(ctx, opts, owner_repo_package, page, page_size):
                      Severity: Minor
                      Found in cloudsmith_cli/cli/commands/quarantine.py - About 35 mins to fix

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

                        def delete(ctx, opts, owner, identifier, yes):
                        Severity: Minor
                        Found in cloudsmith_cli/cli/commands/policy/license.py - About 35 mins to fix

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

                          def refresh(ctx, opts, owner_repo_identifier, show_tokens, yes):
                          Severity: Minor
                          Found in cloudsmith_cli/cli/commands/entitlements.py - About 35 mins to fix

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

                                def __init__(self, status, detail=None, headers=None, body=None, fields=None):
                            Severity: Minor
                            Found in cloudsmith_cli/core/api/exceptions.py - About 35 mins to fix

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

                                  def func(ctx, opts, owner_repo, page, page_size):
                              Severity: Minor
                              Found in cloudsmith_cli/cli/commands/upstream.py - About 35 mins to fix

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

                                def ls(ctx, opts, owner, page, page_size):
                                Severity: Minor
                                Found in cloudsmith_cli/cli/commands/policy/license.py - About 35 mins to fix

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

                                  def replace_tags(ctx, opts, owner_repo_package, tags, immutable):
                                  Severity: Minor
                                  Found in cloudsmith_cli/cli/commands/tags.py - About 35 mins to fix

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

                                    def create_entitlement(owner, repo, name, token, show_tokens):
                                    Severity: Minor
                                    Found in cloudsmith_cli/core/api/entitlements.py - About 35 mins to fix

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

                                          def resolve_command(self, ctx, args):
                                              try:
                                                  return super().resolve_command(ctx, args)
                                              except click.exceptions.UsageError:
                                                  # Before DYM kicks in, check to see if the command prefix matches
                                      Severity: Minor
                                      Found in cloudsmith_cli/cli/command.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 get_error_hint has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                          def get_error_hint(self, ctx):
                                              if self.ctx:
                                                  files = []
                                                  for path in self.ctx.config_searchpath:
                                                      for filename in self.ctx.config_files:
                                      Severity: Minor
                                      Found in cloudsmith_cli/cli/config.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