engine-bay/admin-portal

View on GitHub

Showing 72 of 112 total issues

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

test("Variables index page should render", async () => {
  render(
    <AdminContext>
      <Resource
        name="data-variable-blueprints"
EngineBay.AdminPortal/AdminPortal/src/pages/blueprints/blueprints.test.tsx on lines 6..21
EngineBay.AdminPortal/AdminPortal/src/pages/expressions/expression.test.tsx on lines 6..21
EngineBay.AdminPortal/AdminPortal/src/pages/tables/tables.test.tsx on lines 6..21
EngineBay.AdminPortal/AdminPortal/src/pages/triggers/triggers.test.tsx on lines 6..21

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 122.

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

test("Expressions index page should render", async () => {
  render(
    <AdminContext>
      <Resource
        name="meta-data/Expressions"
EngineBay.AdminPortal/AdminPortal/src/pages/blueprints/blueprints.test.tsx on lines 6..21
EngineBay.AdminPortal/AdminPortal/src/pages/tables/tables.test.tsx on lines 6..21
EngineBay.AdminPortal/AdminPortal/src/pages/triggers/triggers.test.tsx on lines 6..21
EngineBay.AdminPortal/AdminPortal/src/pages/variables/variables.test.tsx on lines 6..21

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 122.

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

test("Triggers index page should render", async () => {
  render(
    <AdminContext>
      <Resource
        name="trigger-blueprints"
EngineBay.AdminPortal/AdminPortal/src/pages/blueprints/blueprints.test.tsx on lines 6..21
EngineBay.AdminPortal/AdminPortal/src/pages/expressions/expression.test.tsx on lines 6..21
EngineBay.AdminPortal/AdminPortal/src/pages/tables/tables.test.tsx on lines 6..21
EngineBay.AdminPortal/AdminPortal/src/pages/variables/variables.test.tsx on lines 6..21

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 122.

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

test("Tables index page should render", async () => {
  render(
    <AdminContext>
      <Resource
        name="data-table-blueprints"
EngineBay.AdminPortal/AdminPortal/src/pages/blueprints/blueprints.test.tsx on lines 6..21
EngineBay.AdminPortal/AdminPortal/src/pages/expressions/expression.test.tsx on lines 6..21
EngineBay.AdminPortal/AdminPortal/src/pages/triggers/triggers.test.tsx on lines 6..21
EngineBay.AdminPortal/AdminPortal/src/pages/variables/variables.test.tsx on lines 6..21

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 122.

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

test("Blueprints index page should render", async () => {
  render(
    <AdminContext>
      <Resource
        name="meta-data/blueprints"
EngineBay.AdminPortal/AdminPortal/src/pages/expressions/expression.test.tsx on lines 6..21
EngineBay.AdminPortal/AdminPortal/src/pages/tables/tables.test.tsx on lines 6..21
EngineBay.AdminPortal/AdminPortal/src/pages/triggers/triggers.test.tsx on lines 6..21
EngineBay.AdminPortal/AdminPortal/src/pages/variables/variables.test.tsx on lines 6..21

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 122.

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

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

        <TabbedShowLayout.Tab
          label={translate("outputDataVariables")}
          path="outputDataVariableBlueprint"
        >
          <TextField
EngineBay.AdminPortal/AdminPortal/src/pages/expressions/Expressions.tsx on lines 185..201

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 108.

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

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

        <TabbedShowLayout.Tab
          label={translate("outputDataVariables")}
          path="outputDataVariableBlueprint"
        >
          <TextField
EngineBay.AdminPortal/AdminPortal/src/pages/triggers/Triggers.tsx on lines 148..164

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 108.

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

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

        const { json } = await httpClient(url, {
            method: 'PUT',
            body: JSON.stringify(params.data),
            user: {
                authenticated: localStorage.getItem("isAuthenticated") === "true",
Severity: Major
Found in EngineBay.AdminPortal/AdminPortal/src/lib/data-provider.ts and 1 other location - About 2 hrs to fix
EngineBay.AdminPortal/AdminPortal/src/lib/data-provider.ts on lines 106..113

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 83.

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

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

        const { json } = await httpClient(url, {
            method: 'PUT',
            body: JSON.stringify(params.data),
            user: {
                authenticated: localStorage.getItem("isAuthenticated") === "true",
Severity: Major
Found in EngineBay.AdminPortal/AdminPortal/src/lib/data-provider.ts and 1 other location - About 2 hrs to fix
EngineBay.AdminPortal/AdminPortal/src/lib/data-provider.ts on lines 122..129

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 83.

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

const OutputDataVariableBlueprintsCount = () => {
  const record = useRecordContext();
  if (!record) return null;
  return (
    <Count
EngineBay.AdminPortal/AdminPortal/src/pages/expressions/Expressions.tsx on lines 32..40

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 76.

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

const InputDataVariableBlueprintsCount = () => {
  const record = useRecordContext();
  if (!record) return null;
  return (
    <Count
EngineBay.AdminPortal/AdminPortal/src/pages/expressions/Expressions.tsx on lines 42..50

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 76.

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 4 locations. Consider refactoring.
Open

        for (const dataVariableBlueprint of blueprint.dataVariableBlueprints) {
          blueprintIdDictionary[dataVariableBlueprint.id] = blueprint.id;
          elementIdDictionary[dataVariableBlueprint.id] =
            dataVariableBlueprint.id;
          elementTypeDictionary[dataVariableBlueprint.id] =
EngineBay.AdminPortal/AdminPortal/src/pages/studio/WorkbookTree.tsx on lines 140..145
EngineBay.AdminPortal/AdminPortal/src/pages/studio/WorkbookTree.tsx on lines 146..150
EngineBay.AdminPortal/AdminPortal/src/pages/studio/WorkbookTree.tsx on lines 158..162

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 74.

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 4 locations. Consider refactoring.
Open

        for (const dataTableBlueprint of blueprint.dataTableBlueprints) {
          blueprintIdDictionary[dataTableBlueprint.id] = blueprint.id;
          elementIdDictionary[dataTableBlueprint.id] = dataTableBlueprint.id;
          elementTypeDictionary[dataTableBlueprint.id] = ElementType.DataTable;
        }
EngineBay.AdminPortal/AdminPortal/src/pages/studio/WorkbookTree.tsx on lines 140..145
EngineBay.AdminPortal/AdminPortal/src/pages/studio/WorkbookTree.tsx on lines 151..157
EngineBay.AdminPortal/AdminPortal/src/pages/studio/WorkbookTree.tsx on lines 158..162

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 74.

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 4 locations. Consider refactoring.
Open

        for (const triggerBlueprint of blueprint.triggerBlueprints) {
          blueprintIdDictionary[triggerBlueprint.id] = blueprint.id;
          elementIdDictionary[triggerBlueprint.id] = triggerBlueprint.id;
          elementTypeDictionary[triggerBlueprint.id] = ElementType.Trigger;
        }
EngineBay.AdminPortal/AdminPortal/src/pages/studio/WorkbookTree.tsx on lines 140..145
EngineBay.AdminPortal/AdminPortal/src/pages/studio/WorkbookTree.tsx on lines 146..150
EngineBay.AdminPortal/AdminPortal/src/pages/studio/WorkbookTree.tsx on lines 151..157

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 74.

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 4 locations. Consider refactoring.
Open

        for (const expressionBlueprint of blueprint.expressionBlueprints) {
          blueprintIdDictionary[expressionBlueprint.id] = blueprint.id;
          elementIdDictionary[expressionBlueprint.id] = expressionBlueprint.id;
          elementTypeDictionary[expressionBlueprint.id] =
            ElementType.Expression;
EngineBay.AdminPortal/AdminPortal/src/pages/studio/WorkbookTree.tsx on lines 146..150
EngineBay.AdminPortal/AdminPortal/src/pages/studio/WorkbookTree.tsx on lines 151..157
EngineBay.AdminPortal/AdminPortal/src/pages/studio/WorkbookTree.tsx on lines 158..162

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 74.

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

        initialNodes.push({
          id: dataTableBlueprint.id || uuidv4(),
          data: {
            label: dataTableBlueprint.name,
            type: ElementType.DataTable,
EngineBay.AdminPortal/AdminPortal/src/pages/studio/BlueprintVisualizer.tsx on lines 155..162

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 70.

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

        initialNodes.push({
          id: triggerBlueprint.id || uuidv4(),
          data: {
            label: triggerBlueprint.name,
            type: ElementType.Trigger,
EngineBay.AdminPortal/AdminPortal/src/pages/studio/BlueprintVisualizer.tsx on lines 204..211

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 70.

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

const ExpressionBlueprintsCount = () => {
  const record = useRecordContext();
  if (!record) return null;
  return (
    <Count
EngineBay.AdminPortal/AdminPortal/src/pages/blueprints/Blueprints.tsx on lines 42..50
EngineBay.AdminPortal/AdminPortal/src/pages/blueprints/Blueprints.tsx on lines 52..60
EngineBay.AdminPortal/AdminPortal/src/pages/blueprints/Blueprints.tsx on lines 62..70
EngineBay.AdminPortal/AdminPortal/src/pages/expressions/Expressions.tsx on lines 52..60

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 68.

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

const DataVariableBlueprintsCount = () => {
  const record = useRecordContext();
  if (!record) return null;
  return (
    <Count
EngineBay.AdminPortal/AdminPortal/src/pages/blueprints/Blueprints.tsx on lines 32..40
EngineBay.AdminPortal/AdminPortal/src/pages/blueprints/Blueprints.tsx on lines 52..60
EngineBay.AdminPortal/AdminPortal/src/pages/blueprints/Blueprints.tsx on lines 62..70
EngineBay.AdminPortal/AdminPortal/src/pages/expressions/Expressions.tsx on lines 52..60

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 68.

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

const DataTableBlueprintsCount = () => {
  const record = useRecordContext();
  if (!record) return null;
  return (
    <Count
EngineBay.AdminPortal/AdminPortal/src/pages/blueprints/Blueprints.tsx on lines 32..40
EngineBay.AdminPortal/AdminPortal/src/pages/blueprints/Blueprints.tsx on lines 42..50
EngineBay.AdminPortal/AdminPortal/src/pages/blueprints/Blueprints.tsx on lines 62..70
EngineBay.AdminPortal/AdminPortal/src/pages/expressions/Expressions.tsx on lines 52..60

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 68.

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