prescottprue/fireadmin

View on GitHub

Showing 224 of 224 total issues

Similar blocks of code found in 5 locations. Consider refactoring.
Open

        <div className={classes.actions}>
          <Typography className={classes.header}>Inputs</Typography>
          <ActionTemplateInputs />
        </div>
src/routes/ActionTemplate/components/ActionTemplateForm/ActionTemplateForm.js on lines 152..155
src/routes/ActionTemplate/components/ActionTemplateForm/ActionTemplateForm.js on lines 160..163
src/routes/ActionTemplate/components/ActionTemplateForm/ActionTemplateForm.js on lines 164..167
src/routes/ActionTemplates/components/ActionTemplatesPage/ActionTemplatesPage.js on lines 12..15

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 55.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

        <div className={classes.actions}>
          <Typography className={classes.header}>Backups</Typography>
          <ActionTemplateBackups />
        </div>
src/routes/ActionTemplate/components/ActionTemplateForm/ActionTemplateForm.js on lines 152..155
src/routes/ActionTemplate/components/ActionTemplateForm/ActionTemplateForm.js on lines 156..159
src/routes/ActionTemplate/components/ActionTemplateForm/ActionTemplateForm.js on lines 164..167
src/routes/ActionTemplates/components/ActionTemplatesPage/ActionTemplatesPage.js on lines 12..15

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 55.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

        <div className={classes.actions}>
          <Typography className={classes.header}>Steps</Typography>
          <ActionTemplateSteps />
        </div>
src/routes/ActionTemplate/components/ActionTemplateForm/ActionTemplateForm.js on lines 152..155
src/routes/ActionTemplate/components/ActionTemplateForm/ActionTemplateForm.js on lines 156..159
src/routes/ActionTemplate/components/ActionTemplateForm/ActionTemplateForm.js on lines 160..163
src/routes/ActionTemplates/components/ActionTemplatesPage/ActionTemplatesPage.js on lines 12..15

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 55.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    if (docWriteErr) {
      console.error(
        `Error copying doc from "${srcRef.path}" to "${destRef.path}": `,
        docWriteErr.message || docWriteErr
      )
Severity: Major
Found in functions/src/actionRunner/utils.ts and 1 other location - About 1 hr to fix
functions/src/actionRunner/utils.ts on lines 356..362

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 55.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    await createProjectEvent(
      { projectId, firestore, FieldValue },
      {
        eventType: 'addRole',
        eventData: { roleKey: newRole.name },
src/routes/Projects/routes/Project/routes/Environments/components/EnvironmentsPage/useEnvironmentsPage.js on lines 116..123

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 55.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    await createProjectEvent(
      { projectId, firestore, FieldValue },
      {
        eventType: 'createEnvironment',
        eventData: { newEnvironmentId: newEnvironmentRes.id },
src/routes/Projects/routes/Project/routes/Permissions/components/RolesTable/RolesTable.js on lines 62..69

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 55.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

  if (writeErr) {
    console.error(
      `Error batch copying docs from "${srcRef.id}" to "${destRef.id}": `,
      writeErr.message || writeErr
    )
Severity: Major
Found in functions/src/actionRunner/utils.ts and 1 other location - About 1 hr to fix
functions/src/actionRunner/utils.ts on lines 335..341

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 55.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    await createProjectEvent(
      { projectId, firestore, FieldValue },
      {
        eventType: 'updateRole',
        eventData: { roleKey },
src/routes/Projects/routes/Project/routes/Permissions/components/RolesTableRow/RolesTableRow.js on lines 80..87

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 54.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    await createProjectEvent(
      { projectId, firestore, FieldValue },
      {
        eventType: 'deleteRole',
        eventData: { roleKey },
src/routes/Projects/routes/Project/routes/Permissions/components/RolesTableRow/RolesTableRow.js on lines 104..111

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 54.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Function ActionTemplateForm has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

function ActionTemplateForm({
  onSubmit,
  defaultValues,
  editable,
  startTemplateDelete

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 batchCopyBetweenFirestoreRefs has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

export async function batchCopyBetweenFirestoreRefs({
  srcRef,
  destRef,
  opts
}: {
Severity: Minor
Found in functions/src/actionRunner/utils.ts - About 55 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

Similar blocks of code found in 9 locations. Consider refactoring.
Open

                  <TextField
                    name={`${name}[${index}].name`}
                    label="Name"
                    className={classes.field}
                    fullWidth
src/routes/ActionTemplate/components/ActionTemplateBackups/ActionTemplateBackups.js on lines 73..79
src/routes/ActionTemplate/components/ActionTemplateBackups/ActionTemplateBackups.js on lines 119..125
src/routes/ActionTemplate/components/ActionTemplateEnvs/ActionTemplateEnvs.js on lines 60..66
src/routes/ActionTemplate/components/ActionTemplateEnvs/ActionTemplateEnvs.js on lines 67..73
src/routes/ActionTemplate/components/ActionTemplateInputs/ActionTemplateInputs.js on lines 61..67
src/routes/ActionTemplate/components/ActionTemplateInputs/ActionTemplateInputs.js on lines 68..74
src/routes/ActionTemplate/components/ActionTemplateInputs/ActionTemplateInputs.js on lines 102..108
src/routes/ActionTemplate/components/ActionTemplateSteps/ActionTemplateSteps.js on lines 116..122

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 9 locations. Consider refactoring.
Open

                  <TextField
                    name={`${name}[${index}].description`}
                    label="Description"
                    className={classes.field}
                    fullWidth
src/routes/ActionTemplate/components/ActionTemplateBackups/ActionTemplateBackups.js on lines 66..72
src/routes/ActionTemplate/components/ActionTemplateBackups/ActionTemplateBackups.js on lines 119..125
src/routes/ActionTemplate/components/ActionTemplateEnvs/ActionTemplateEnvs.js on lines 60..66
src/routes/ActionTemplate/components/ActionTemplateEnvs/ActionTemplateEnvs.js on lines 67..73
src/routes/ActionTemplate/components/ActionTemplateInputs/ActionTemplateInputs.js on lines 61..67
src/routes/ActionTemplate/components/ActionTemplateInputs/ActionTemplateInputs.js on lines 68..74
src/routes/ActionTemplate/components/ActionTemplateInputs/ActionTemplateInputs.js on lines 102..108
src/routes/ActionTemplate/components/ActionTemplateSteps/ActionTemplateSteps.js on lines 116..122

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 9 locations. Consider refactoring.
Open

                  <TextField
                    name={`${name}[${index}].description`}
                    label="Description"
                    className={classes.field}
                    fullWidth
src/routes/ActionTemplate/components/ActionTemplateBackups/ActionTemplateBackups.js on lines 66..72
src/routes/ActionTemplate/components/ActionTemplateBackups/ActionTemplateBackups.js on lines 73..79
src/routes/ActionTemplate/components/ActionTemplateBackups/ActionTemplateBackups.js on lines 119..125
src/routes/ActionTemplate/components/ActionTemplateEnvs/ActionTemplateEnvs.js on lines 60..66
src/routes/ActionTemplate/components/ActionTemplateInputs/ActionTemplateInputs.js on lines 61..67
src/routes/ActionTemplate/components/ActionTemplateInputs/ActionTemplateInputs.js on lines 68..74
src/routes/ActionTemplate/components/ActionTemplateInputs/ActionTemplateInputs.js on lines 102..108
src/routes/ActionTemplate/components/ActionTemplateSteps/ActionTemplateSteps.js on lines 116..122

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 9 locations. Consider refactoring.
Open

                  <TextField
                    name={`${name}[${index}].name`}
                    label="Name"
                    className={classes.field}
                    fullWidth
src/routes/ActionTemplate/components/ActionTemplateBackups/ActionTemplateBackups.js on lines 66..72
src/routes/ActionTemplate/components/ActionTemplateBackups/ActionTemplateBackups.js on lines 73..79
src/routes/ActionTemplate/components/ActionTemplateBackups/ActionTemplateBackups.js on lines 119..125
src/routes/ActionTemplate/components/ActionTemplateEnvs/ActionTemplateEnvs.js on lines 60..66
src/routes/ActionTemplate/components/ActionTemplateEnvs/ActionTemplateEnvs.js on lines 67..73
src/routes/ActionTemplate/components/ActionTemplateInputs/ActionTemplateInputs.js on lines 68..74
src/routes/ActionTemplate/components/ActionTemplateInputs/ActionTemplateInputs.js on lines 102..108
src/routes/ActionTemplate/components/ActionTemplateSteps/ActionTemplateSteps.js on lines 116..122

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 9 locations. Consider refactoring.
Open

                  <TextField
                    name={`${name}[${index}].description`}
                    label="Description"
                    className={classes.field}
                    fullWidth
src/routes/ActionTemplate/components/ActionTemplateBackups/ActionTemplateBackups.js on lines 66..72
src/routes/ActionTemplate/components/ActionTemplateBackups/ActionTemplateBackups.js on lines 73..79
src/routes/ActionTemplate/components/ActionTemplateBackups/ActionTemplateBackups.js on lines 119..125
src/routes/ActionTemplate/components/ActionTemplateEnvs/ActionTemplateEnvs.js on lines 60..66
src/routes/ActionTemplate/components/ActionTemplateEnvs/ActionTemplateEnvs.js on lines 67..73
src/routes/ActionTemplate/components/ActionTemplateInputs/ActionTemplateInputs.js on lines 61..67
src/routes/ActionTemplate/components/ActionTemplateInputs/ActionTemplateInputs.js on lines 68..74
src/routes/ActionTemplate/components/ActionTemplateInputs/ActionTemplateInputs.js on lines 102..108

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 9 locations. Consider refactoring.
Open

                  <TextField
                    name={`${name}[${index}].description`}
                    label="Description"
                    className={classes.field}
                    fullWidth
src/routes/ActionTemplate/components/ActionTemplateBackups/ActionTemplateBackups.js on lines 66..72
src/routes/ActionTemplate/components/ActionTemplateBackups/ActionTemplateBackups.js on lines 73..79
src/routes/ActionTemplate/components/ActionTemplateBackups/ActionTemplateBackups.js on lines 119..125
src/routes/ActionTemplate/components/ActionTemplateEnvs/ActionTemplateEnvs.js on lines 60..66
src/routes/ActionTemplate/components/ActionTemplateEnvs/ActionTemplateEnvs.js on lines 67..73
src/routes/ActionTemplate/components/ActionTemplateInputs/ActionTemplateInputs.js on lines 61..67
src/routes/ActionTemplate/components/ActionTemplateInputs/ActionTemplateInputs.js on lines 102..108
src/routes/ActionTemplate/components/ActionTemplateSteps/ActionTemplateSteps.js on lines 116..122

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 9 locations. Consider refactoring.
Open

                  <TextField
                    name={`${name}[${index}].name`}
                    label="Name"
                    className={classes.field}
                    fullWidth
src/routes/ActionTemplate/components/ActionTemplateBackups/ActionTemplateBackups.js on lines 66..72
src/routes/ActionTemplate/components/ActionTemplateBackups/ActionTemplateBackups.js on lines 73..79
src/routes/ActionTemplate/components/ActionTemplateBackups/ActionTemplateBackups.js on lines 119..125
src/routes/ActionTemplate/components/ActionTemplateEnvs/ActionTemplateEnvs.js on lines 67..73
src/routes/ActionTemplate/components/ActionTemplateInputs/ActionTemplateInputs.js on lines 61..67
src/routes/ActionTemplate/components/ActionTemplateInputs/ActionTemplateInputs.js on lines 68..74
src/routes/ActionTemplate/components/ActionTemplateInputs/ActionTemplateInputs.js on lines 102..108
src/routes/ActionTemplate/components/ActionTemplateSteps/ActionTemplateSteps.js on lines 116..122

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 9 locations. Consider refactoring.
Open

                    <TextField
                      name={`${name}[${index}].variableName`}
                      label="Variable Name"
                      className={classes.field}
                      fullWidth
src/routes/ActionTemplate/components/ActionTemplateBackups/ActionTemplateBackups.js on lines 66..72
src/routes/ActionTemplate/components/ActionTemplateBackups/ActionTemplateBackups.js on lines 73..79
src/routes/ActionTemplate/components/ActionTemplateBackups/ActionTemplateBackups.js on lines 119..125
src/routes/ActionTemplate/components/ActionTemplateEnvs/ActionTemplateEnvs.js on lines 60..66
src/routes/ActionTemplate/components/ActionTemplateEnvs/ActionTemplateEnvs.js on lines 67..73
src/routes/ActionTemplate/components/ActionTemplateInputs/ActionTemplateInputs.js on lines 61..67
src/routes/ActionTemplate/components/ActionTemplateInputs/ActionTemplateInputs.js on lines 68..74
src/routes/ActionTemplate/components/ActionTemplateSteps/ActionTemplateSteps.js on lines 116..122

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 9 locations. Consider refactoring.
Open

                  <TextField
                    name={`${name}[${index}].inputs[0].path`}
                    label="Path"
                    className={classes.field}
                    fullWidth
src/routes/ActionTemplate/components/ActionTemplateBackups/ActionTemplateBackups.js on lines 66..72
src/routes/ActionTemplate/components/ActionTemplateBackups/ActionTemplateBackups.js on lines 73..79
src/routes/ActionTemplate/components/ActionTemplateEnvs/ActionTemplateEnvs.js on lines 60..66
src/routes/ActionTemplate/components/ActionTemplateEnvs/ActionTemplateEnvs.js on lines 67..73
src/routes/ActionTemplate/components/ActionTemplateInputs/ActionTemplateInputs.js on lines 61..67
src/routes/ActionTemplate/components/ActionTemplateInputs/ActionTemplateInputs.js on lines 68..74
src/routes/ActionTemplate/components/ActionTemplateInputs/ActionTemplateInputs.js on lines 102..108
src/routes/ActionTemplate/components/ActionTemplateSteps/ActionTemplateSteps.js on lines 116..122

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language