cloudsmith-io/cloudsmith-cli

View on GitHub

Showing 98 of 172 total issues

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 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 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/vulnerability.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 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 remove_quarantine has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                def remove_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 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 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 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 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 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 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 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 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 get has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                    def get(ctx, opts, owner_repo, page, page_size):
                                    Severity: Minor
                                    Found in cloudsmith_cli/cli/commands/repos.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 quota_history has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                        Open

                                        def quota_history(owner=None, oss=False, **kwargs):
                                            """Get Quota history for namespace"""
                                            client = get_quota_api()
                                        
                                            api_kwargs = {}
                                        Severity: Minor
                                        Found in cloudsmith_cli/core/api/quota.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