FarmBot/Farmbot-Web-App

View on GitHub
frontend/three_d_garden/bot.tsx

Summary

Maintainability
F
1 wk
Test Coverage

Function Bot has 841 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const Bot = (props: FarmbotModelProps) => {
  const config = props.config;
  const {
    x, y, z, botSizeX, botSizeY, botSizeZ, beamLength, trail, laser, soilHeight,
    bedXOffset, bedYOffset, bedLengthOuter, bedWidthOuter, tracks, zDimension,
Severity: Major
Found in frontend/three_d_garden/bot.tsx - About 4 days to fix

    File bot.tsx has 1014 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /* eslint-disable complexity */
    import React, { useEffect, useState } from "react";
    import * as THREE from "three";
    import {
      Cylinder, Extrude, Line, Trail, Tube, useGLTF, useTexture,
    Severity: Major
    Found in frontend/three_d_garden/bot.tsx - About 2 days to fix

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

      export const Bot = (props: FarmbotModelProps) => {
        const config = props.config;
        const {
          x, y, z, botSizeX, botSizeY, botSizeZ, beamLength, trail, laser, soilHeight,
          bedXOffset, bedYOffset, bedLengthOuter, bedWidthOuter, tracks, zDimension,
      Severity: Minor
      Found in frontend/three_d_garden/bot.tsx - 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 3 locations. Consider refactoring.
      Open

      type Box = GLTF & {
        nodes: {
          Electronics_Box: THREE.Mesh;
          Electronics_Box_Gasket: THREE.Mesh;
          Electronics_Box_Lid: THREE.Mesh;
      Severity: Major
      Found in frontend/three_d_garden/bot.tsx and 2 other locations - About 4 hrs to fix
      frontend/settings/pin_bindings/model.tsx on lines 24..35
      frontend/three_d_garden/parts/seed_trough_assembly.tsx on lines 8..19

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

      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

            <Mesh name={"zMotorHousing"}
              position={[
                threeSpace(x + 4, bedLengthOuter) + bedXOffset,
                threeSpace(y + utmRadius - 47, bedWidthOuter) + bedYOffset,
                zZero + zDir * z + zAxisLength - 80,
      Severity: Major
      Found in frontend/three_d_garden/bot.tsx and 1 other location - About 3 hrs to fix
      frontend/three_d_garden/bot.tsx on lines 529..539

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

      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

            <Mesh name={"zMotorMount"}
              position={[
                threeSpace(x + 5, bedLengthOuter) + bedXOffset,
                threeSpace(y + utmRadius - 65, bedWidthOuter) + bedYOffset,
                zZero + zDir * z + zAxisLength - 80,
      Severity: Major
      Found in frontend/three_d_garden/bot.tsx and 1 other location - About 3 hrs to fix
      frontend/three_d_garden/bot.tsx on lines 508..518

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

      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

                    <Cylinder
                      name={"button-color"}
                      material-color={color}
                      args={[9, 0, 3.5]}
                      position={[-30, btnPosition, 0]}
      Severity: Major
      Found in frontend/three_d_garden/bot.tsx and 1 other location - About 1 hr to fix
      frontend/three_d_garden/bot.tsx on lines 888..892

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

      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

                    <Cylinder name={"led-color"}
                      material-color={color}
                      args={[6.75, 6.75, 3]}
                      position={[-50, position, 0]}
                      rotation={[Math.PI / 2, 0, 0]} />
      Severity: Major
      Found in frontend/three_d_garden/bot.tsx and 1 other location - About 1 hr to fix
      frontend/three_d_garden/bot.tsx on lines 861..866

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

      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

              <Mesh name={"electronicsBoxGasket"}
                geometry={box.nodes.Electronics_Box_Gasket.geometry}
                material={box.materials[ElectronicsBoxMaterial.gasket]}
                scale={1000} />
      Severity: Major
      Found in frontend/three_d_garden/bot.tsx and 1 other location - About 1 hr to fix
      frontend/three_d_garden/bot.tsx on lines 839..842

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

      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

              <Mesh name={"electronicsBoxLid"}
                geometry={box.nodes.Electronics_Box_Lid.geometry}
                material={box.materials[ElectronicsBoxMaterial.lid]}
                scale={1000} />
      Severity: Major
      Found in frontend/three_d_garden/bot.tsx and 1 other location - About 1 hr to fix
      frontend/three_d_garden/bot.tsx on lines 835..838

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

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

      type Pi = GLTF & {
        nodes: { [PartName.pi]: THREE.Mesh };
        materials: { PaletteMaterial001: THREE.MeshStandardMaterial };
      }
      Severity: Major
      Found in frontend/three_d_garden/bot.tsx and 6 other locations - About 1 hr to fix
      frontend/three_d_garden/bot.tsx on lines 52..55
      frontend/three_d_garden/bot.tsx on lines 68..71
      frontend/three_d_garden/bot.tsx on lines 72..75
      frontend/three_d_garden/bot.tsx on lines 83..86
      frontend/three_d_garden/bot.tsx on lines 131..134
      frontend/three_d_garden/bot.tsx on lines 135..138

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

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

      type WateringNozzle = GLTF & {
        nodes: { [PartName.wateringNozzle]: THREE.Mesh };
        materials: { PaletteMaterial001: THREE.MeshStandardMaterial };
      }
      Severity: Major
      Found in frontend/three_d_garden/bot.tsx and 6 other locations - About 1 hr to fix
      frontend/three_d_garden/bot.tsx on lines 52..55
      frontend/three_d_garden/bot.tsx on lines 68..71
      frontend/three_d_garden/bot.tsx on lines 72..75
      frontend/three_d_garden/bot.tsx on lines 127..130
      frontend/three_d_garden/bot.tsx on lines 131..134
      frontend/three_d_garden/bot.tsx on lines 135..138

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

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

      type HorizontalMotorHousing = GLTF & {
        nodes: { [PartName.horizontalMotorHousing]: THREE.Mesh };
        materials: { PaletteMaterial001: THREE.MeshStandardMaterial };
      }
      Severity: Major
      Found in frontend/three_d_garden/bot.tsx and 6 other locations - About 1 hr to fix
      frontend/three_d_garden/bot.tsx on lines 52..55
      frontend/three_d_garden/bot.tsx on lines 72..75
      frontend/three_d_garden/bot.tsx on lines 83..86
      frontend/three_d_garden/bot.tsx on lines 127..130
      frontend/three_d_garden/bot.tsx on lines 131..134
      frontend/three_d_garden/bot.tsx on lines 135..138

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

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

      type Farmduino = GLTF & {
        nodes: { [PartName.farmduino]: THREE.Mesh };
        materials: { PaletteMaterial001: THREE.MeshStandardMaterial };
      }
      Severity: Major
      Found in frontend/three_d_garden/bot.tsx and 6 other locations - About 1 hr to fix
      frontend/three_d_garden/bot.tsx on lines 52..55
      frontend/three_d_garden/bot.tsx on lines 68..71
      frontend/three_d_garden/bot.tsx on lines 72..75
      frontend/three_d_garden/bot.tsx on lines 83..86
      frontend/three_d_garden/bot.tsx on lines 127..130
      frontend/three_d_garden/bot.tsx on lines 135..138

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

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

      type UTM = GLTF & {
        nodes: { [PartName.utm]: THREE.Mesh };
        materials: { PaletteMaterial001: THREE.MeshStandardMaterial };
      }
      Severity: Major
      Found in frontend/three_d_garden/bot.tsx and 6 other locations - About 1 hr to fix
      frontend/three_d_garden/bot.tsx on lines 68..71
      frontend/three_d_garden/bot.tsx on lines 72..75
      frontend/three_d_garden/bot.tsx on lines 83..86
      frontend/three_d_garden/bot.tsx on lines 127..130
      frontend/three_d_garden/bot.tsx on lines 131..134
      frontend/three_d_garden/bot.tsx on lines 135..138

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

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

      type ZAxisMotorMount = GLTF & {
        nodes: { [PartName.zAxisMotorMount]: THREE.Mesh };
        materials: { PaletteMaterial001: THREE.MeshStandardMaterial };
      }
      Severity: Major
      Found in frontend/three_d_garden/bot.tsx and 6 other locations - About 1 hr to fix
      frontend/three_d_garden/bot.tsx on lines 52..55
      frontend/three_d_garden/bot.tsx on lines 68..71
      frontend/three_d_garden/bot.tsx on lines 83..86
      frontend/three_d_garden/bot.tsx on lines 127..130
      frontend/three_d_garden/bot.tsx on lines 131..134
      frontend/three_d_garden/bot.tsx on lines 135..138

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

      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

      type Led = GLTF & {
        nodes: {
          LED: THREE.Mesh;
        };
        materials: {
      Severity: Major
      Found in frontend/three_d_garden/bot.tsx and 1 other location - About 1 hr to fix
      frontend/settings/pin_bindings/model.tsx on lines 46..53

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

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

      type Solenoid = GLTF & {
        nodes: { [PartName.solenoid]: THREE.Mesh };
        materials: { PaletteMaterial001: THREE.MeshStandardMaterial };
      }
      Severity: Major
      Found in frontend/three_d_garden/bot.tsx and 6 other locations - About 1 hr to fix
      frontend/three_d_garden/bot.tsx on lines 52..55
      frontend/three_d_garden/bot.tsx on lines 68..71
      frontend/three_d_garden/bot.tsx on lines 72..75
      frontend/three_d_garden/bot.tsx on lines 83..86
      frontend/three_d_garden/bot.tsx on lines 127..130
      frontend/three_d_garden/bot.tsx on lines 131..134

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

      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

      type Btn = GLTF & {
        nodes: {
          ["Push_Button_-_Red"]: THREE.Mesh;
        };
        materials: {
      Severity: Major
      Found in frontend/three_d_garden/bot.tsx and 1 other location - About 1 hr to fix
      frontend/settings/pin_bindings/model.tsx on lines 37..44

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

      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

            position={[
              threeSpace(x + 11, bedLengthOuter) + bedXOffset,
              threeSpace(y, bedWidthOuter) + bedYOffset,
              zZero + zDir * z + utmHeight / 2 - 15,
            ]}
      Severity: Minor
      Found in frontend/three_d_garden/bot.tsx and 1 other location - About 55 mins to fix
      frontend/three_d_garden/bot.tsx on lines 702..706

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

              position={[
                threeSpace(x + 11, bedLengthOuter) + bedXOffset,
                threeSpace(y, bedWidthOuter) + bedYOffset,
                zZero + zDir * z + utmHeight / 2 - 18,
              ]}
      Severity: Minor
      Found in frontend/three_d_garden/bot.tsx and 1 other location - About 55 mins to fix
      frontend/three_d_garden/bot.tsx on lines 717..721

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

                position={[
                  threeSpace(x - 63, bedLengthOuter) + bedXOffset,
                  threeSpace(y - (index == 0 ? 5 : -25) + bedColumnYOffset,
                    bedWidthOuter),
                  columnLength + 55,
      Severity: Minor
      Found in frontend/three_d_garden/bot.tsx and 1 other location - About 55 mins to fix
      frontend/three_d_garden/bot.tsx on lines 370..375

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

                position={[
                  threeSpace(x - 68, bedLengthOuter) + bedXOffset,
                  threeSpace(y - (index == 0 ? 5 : -25) + bedColumnYOffset,
                    bedWidthOuter),
                  columnLength + 80,
      Severity: Minor
      Found in frontend/three_d_garden/bot.tsx and 1 other location - About 55 mins to fix
      frontend/three_d_garden/bot.tsx on lines 384..389

      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

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

                range(1, 6).map(i => {
                  const hole = SVGLoader.createShapes(svg.paths[i])[0];
                  outline.holes.push(hole);
                });
      Severity: Minor
      Found in frontend/three_d_garden/bot.tsx and 1 other location - About 45 mins to fix
      frontend/three_d_garden/bot.tsx on lines 277..280

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

      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

                range(3).map(i => {
                  const hole = SVGLoader.createShapes(svg.paths[i])[0];
                  outline.holes.push(hole);
                });
      Severity: Minor
      Found in frontend/three_d_garden/bot.tsx and 1 other location - About 45 mins to fix
      frontend/three_d_garden/bot.tsx on lines 268..271

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

      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

            position={[
              threeSpace(x + 12, bedLengthOuter) + bedXOffset,
              threeSpace(y + 55, bedWidthOuter) + bedYOffset,
              zZero + zDir * z + 490,
            ]} />
      Severity: Minor
      Found in frontend/three_d_garden/bot.tsx and 1 other location - About 40 mins to fix
      frontend/three_d_garden/bot.tsx on lines 601..605

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

      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

            position={[
              threeSpace(x - 41, bedLengthOuter) + bedXOffset,
              threeSpace(y - 25, bedWidthOuter) + bedYOffset,
              zZero + zDir * z + 125,
            ]}
      Severity: Minor
      Found in frontend/three_d_garden/bot.tsx and 1 other location - About 40 mins to fix
      frontend/three_d_garden/bot.tsx on lines 667..671

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

      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

      There are no issues that match your filters.

      Category
      Status