portainer/portainer

View on GitHub
app/react/edge/components/EdgeScriptForm/scripts.ts

Summary

Maintainability
B
6 hrs
Test Coverage

Function buildWindowsSwarmCommand has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function buildWindowsSwarmCommand(
  agentVersion: string,
  edgeKey: string,
  properties: ScriptFormValues,
  useAsyncMode: boolean,
Severity: Minor
Found in app/react/edge/components/EdgeScriptForm/scripts.ts - About 1 hr to fix

    Function buildLinuxSwarmCommand has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export function buildLinuxSwarmCommand(
      agentVersion: string,
      edgeKey: string,
      properties: ScriptFormValues,
      useAsyncMode: boolean,
    Severity: Minor
    Found in app/react/edge/components/EdgeScriptForm/scripts.ts - About 1 hr to fix

      Function buildWindowsSwarmCommand has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

        agentVersion: string,
        edgeKey: string,
        properties: ScriptFormValues,
        useAsyncMode: boolean,
        edgeId?: string,
      Severity: Minor
      Found in app/react/edge/components/EdgeScriptForm/scripts.ts - About 45 mins to fix

        Function buildLinuxKubernetesCommand has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

          agentVersion: string,
          edgeKey: string,
          properties: ScriptFormValues,
          useAsyncMode: boolean,
          edgeId?: string,
        Severity: Minor
        Found in app/react/edge/components/EdgeScriptForm/scripts.ts - About 45 mins to fix

          Function buildLinuxSwarmCommand has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

            agentVersion: string,
            edgeKey: string,
            properties: ScriptFormValues,
            useAsyncMode: boolean,
            edgeId?: string,
          Severity: Minor
          Found in app/react/edge/components/EdgeScriptForm/scripts.ts - About 45 mins to fix

            Function buildWindowsStandaloneCommand has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

              agentVersion: string,
              edgeKey: string,
              properties: ScriptFormValues,
              useAsyncMode: boolean,
              edgeId?: string,
            Severity: Minor
            Found in app/react/edge/components/EdgeScriptForm/scripts.ts - About 45 mins to fix

              Function buildLinuxStandaloneCommand has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                agentVersion: string,
                edgeKey: string,
                properties: ScriptFormValues,
                useAsyncMode: boolean,
                edgeId?: string,
              Severity: Minor
              Found in app/react/edge/components/EdgeScriptForm/scripts.ts - About 45 mins to fix

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

                  edgeKey: string,
                  allowSelfSignedCerts: boolean,
                  edgeId = '$PORTAINER_EDGE_ID',
                  agentSecret = '',
                  useAsyncMode = false
                Severity: Minor
                Found in app/react/edge/components/EdgeScriptForm/scripts.ts - About 35 mins to fix

                  There are no issues that match your filters.

                  Category
                  Status