FarmBot/Farmbot-Web-App

View on GitHub

Showing 1,338 of 1,993 total issues

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

    case "Weed":
      return props.getConfigValue(BooleanSetting.show_weeds)
        ? <WeedPoint
          {...props as ProfilePointProps<TaggedWeedPointer>} />
        : <g id={"weeds-hidden"} />;
Severity: Major
Found in frontend/farm_designer/map/profile/content.tsx and 2 other locations - About 1 hr to fix
frontend/farm_designer/map/profile/content.tsx on lines 185..189
frontend/farm_designer/map/profile/content.tsx on lines 190..194

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

        <Box
          name={"base"}
          castShadow={true}
          receiveShadow={true}
          args={[200, 300, 10]}>
Severity: Major
Found in frontend/three_d_garden/desk.tsx and 2 other locations - About 1 hr to fix
frontend/three_d_garden/utilities_post.tsx on lines 143..148
frontend/three_d_garden/utilities_post.tsx on lines 149..154

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

        <Cylinder name={"pin"}
          castShadow={true}
          receiveShadow={true}
          args={[4, 4, 15]}>
          <MeshPhongMaterial color={"#434343"} />
Severity: Major
Found in frontend/three_d_garden/utilities_post.tsx and 2 other locations - About 1 hr to fix
frontend/three_d_garden/desk.tsx on lines 91..97
frontend/three_d_garden/utilities_post.tsx on lines 143..148

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

    case "Plant":
      return props.getConfigValue(BooleanSetting.show_plants)
        ? <PlantPoint
          {...props as ProfilePointProps<TaggedPlant>} />
        : <g id={"plants-hidden"} />;
Severity: Major
Found in frontend/farm_designer/map/profile/content.tsx and 2 other locations - About 1 hr to fix
frontend/farm_designer/map/profile/content.tsx on lines 185..189
frontend/farm_designer/map/profile/content.tsx on lines 195..199

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

        <Cylinder name={"handle"}
          castShadow={true}
          receiveShadow={true}
          args={[25, 25, 10]}>
          <MeshPhongMaterial color={"#0266b5"} />
Severity: Major
Found in frontend/three_d_garden/utilities_post.tsx and 2 other locations - About 1 hr to fix
frontend/three_d_garden/desk.tsx on lines 91..97
frontend/three_d_garden/utilities_post.tsx on lines 149..154

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

              case "Weed":
                return <WeedInventoryItem
                  key={p.uuid}
                  tpp={p as TaggedWeedPointer}
                  hovered={false}
Severity: Major
Found in frontend/plants/select_plants.tsx and 1 other location - About 1 hr to fix
frontend/plants/select_plants.tsx on lines 400..405

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={"electronicsBoxGasket"}
      geometry={box.nodes.Electronics_Box_Gasket.geometry}
      material={box.materials[ElectronicsBoxMaterial.gasket]}
      scale={SCALE} />
Severity: Major
Found in frontend/settings/pin_bindings/model.tsx and 1 other location - About 1 hr to fix
frontend/settings/pin_bindings/model.tsx on lines 282..285

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={"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

export const regimensReducer = generateReducer<RegimenState>(initialState)
  .add<TaggedResource>(Actions.DESTROY_RESOURCE_OK, (s, { payload }) => {
    switch (payload.uuid) {
      case s.selectedSequenceUUID:
      case s.currentRegimen:
Severity: Major
Found in frontend/regimens/reducer.ts and 1 other location - About 1 hr to fix
frontend/regimens/reducer.ts on lines 41..66

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

        <LocationSelection
          xyzLocation={this.state.xyzLocation}
          deviation={this.state.deviation}
          setLocation={this.setLocation}
          setDeviation={this.setDeviation} />
Severity: Major
Found in frontend/sensors/sensor_readings/sensor_readings.tsx and 1 other location - About 1 hr to fix
frontend/settings/pin_bindings/pin_binding_input_group.tsx on lines 86..90

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={SCALE} />
Severity: Major
Found in frontend/settings/pin_bindings/model.tsx and 1 other location - About 1 hr to fix
frontend/settings/pin_bindings/model.tsx on lines 278..281

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

              case "GenericPointer":
                return <PointInventoryItem
                  key={p.uuid}
                  tpp={p as TaggedGenericPointer}
                  hovered={false}
Severity: Major
Found in frontend/plants/select_plants.tsx and 1 other location - About 1 hr to fix
frontend/plants/select_plants.tsx on lines 406..411

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

    <PinNumberInputGroup
      firmwareHardware={this.props.firmwareHardware}
      pinNumberInput={this.state.pinNumberInput}
      boundPins={this.boundPins}
      setSelectedPin={this.setSelectedPin} />;
Severity: Major
Found in frontend/settings/pin_bindings/pin_binding_input_group.tsx and 1 other location - About 1 hr to fix
frontend/sensors/sensor_readings/sensor_readings.tsx on lines 96..100

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

export enum PanelColor {
  green = "green",
  cyan = "cyan",
  brown = "brown",
  magenta = "magenta",
Severity: Major
Found in frontend/farm_designer/panel_header.tsx and 1 other location - About 1 hr to fix
frontend/settings/firmware/firmware_hardware_support.ts on lines 149..161

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

enum KitLabels {
  arduino = "Genesis v1.2",
  farmduino = "Genesis v1.3",
  farmduino_k14 = "Genesis v1.4",
  farmduino_k15 = "Genesis v1.5",
Severity: Major
Found in frontend/settings/firmware/firmware_hardware_support.ts and 1 other location - About 1 hr to fix
frontend/farm_designer/panel_header.tsx on lines 40..52

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

  route({
    children: true,
    $: Path.route(Path.support()),
    getModule,
    key,
Severity: Major
Found in frontend/route_config.tsx and 24 other locations - About 1 hr to fix
frontend/route_config.tsx on lines 144..151
frontend/route_config.tsx on lines 168..175
frontend/route_config.tsx on lines 176..183
frontend/route_config.tsx on lines 200..207
frontend/route_config.tsx on lines 224..231
frontend/route_config.tsx on lines 240..247
frontend/route_config.tsx on lines 272..279
frontend/route_config.tsx on lines 280..287
frontend/route_config.tsx on lines 312..319
frontend/route_config.tsx on lines 320..327
frontend/route_config.tsx on lines 336..343
frontend/route_config.tsx on lines 344..351
frontend/route_config.tsx on lines 368..375
frontend/route_config.tsx on lines 384..391
frontend/route_config.tsx on lines 400..407
frontend/route_config.tsx on lines 424..431
frontend/route_config.tsx on lines 432..439
frontend/route_config.tsx on lines 440..447
frontend/route_config.tsx on lines 480..487
frontend/route_config.tsx on lines 504..511
frontend/route_config.tsx on lines 512..519
frontend/route_config.tsx on lines 552..559
frontend/route_config.tsx on lines 568..575
frontend/route_config.tsx on lines 592..599

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

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

  route({
    children: true,
    $: Path.route(Path.zones()),
    getModule,
    key,
Severity: Major
Found in frontend/route_config.tsx and 24 other locations - About 1 hr to fix
frontend/route_config.tsx on lines 144..151
frontend/route_config.tsx on lines 168..175
frontend/route_config.tsx on lines 176..183
frontend/route_config.tsx on lines 200..207
frontend/route_config.tsx on lines 224..231
frontend/route_config.tsx on lines 240..247
frontend/route_config.tsx on lines 272..279
frontend/route_config.tsx on lines 280..287
frontend/route_config.tsx on lines 312..319
frontend/route_config.tsx on lines 320..327
frontend/route_config.tsx on lines 336..343
frontend/route_config.tsx on lines 344..351
frontend/route_config.tsx on lines 368..375
frontend/route_config.tsx on lines 384..391
frontend/route_config.tsx on lines 400..407
frontend/route_config.tsx on lines 424..431
frontend/route_config.tsx on lines 432..439
frontend/route_config.tsx on lines 440..447
frontend/route_config.tsx on lines 480..487
frontend/route_config.tsx on lines 488..495
frontend/route_config.tsx on lines 504..511
frontend/route_config.tsx on lines 512..519
frontend/route_config.tsx on lines 552..559
frontend/route_config.tsx on lines 568..575

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

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

  route({
    children: true,
    $: Path.route(Path.plantTemplates()),
    getModule,
    key,
Severity: Major
Found in frontend/route_config.tsx and 24 other locations - About 1 hr to fix
frontend/route_config.tsx on lines 144..151
frontend/route_config.tsx on lines 168..175
frontend/route_config.tsx on lines 176..183
frontend/route_config.tsx on lines 200..207
frontend/route_config.tsx on lines 224..231
frontend/route_config.tsx on lines 240..247
frontend/route_config.tsx on lines 272..279
frontend/route_config.tsx on lines 312..319
frontend/route_config.tsx on lines 320..327
frontend/route_config.tsx on lines 336..343
frontend/route_config.tsx on lines 344..351
frontend/route_config.tsx on lines 368..375
frontend/route_config.tsx on lines 384..391
frontend/route_config.tsx on lines 400..407
frontend/route_config.tsx on lines 424..431
frontend/route_config.tsx on lines 432..439
frontend/route_config.tsx on lines 440..447
frontend/route_config.tsx on lines 480..487
frontend/route_config.tsx on lines 488..495
frontend/route_config.tsx on lines 504..511
frontend/route_config.tsx on lines 512..519
frontend/route_config.tsx on lines 552..559
frontend/route_config.tsx on lines 568..575
frontend/route_config.tsx on lines 592..599

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

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

  route({
    children: true,
    $: Path.route(Path.help()),
    getModule,
    key,
Severity: Major
Found in frontend/route_config.tsx and 24 other locations - About 1 hr to fix
frontend/route_config.tsx on lines 144..151
frontend/route_config.tsx on lines 168..175
frontend/route_config.tsx on lines 176..183
frontend/route_config.tsx on lines 200..207
frontend/route_config.tsx on lines 224..231
frontend/route_config.tsx on lines 240..247
frontend/route_config.tsx on lines 272..279
frontend/route_config.tsx on lines 280..287
frontend/route_config.tsx on lines 312..319
frontend/route_config.tsx on lines 320..327
frontend/route_config.tsx on lines 336..343
frontend/route_config.tsx on lines 344..351
frontend/route_config.tsx on lines 368..375
frontend/route_config.tsx on lines 384..391
frontend/route_config.tsx on lines 400..407
frontend/route_config.tsx on lines 424..431
frontend/route_config.tsx on lines 440..447
frontend/route_config.tsx on lines 480..487
frontend/route_config.tsx on lines 488..495
frontend/route_config.tsx on lines 504..511
frontend/route_config.tsx on lines 512..519
frontend/route_config.tsx on lines 552..559
frontend/route_config.tsx on lines 568..575
frontend/route_config.tsx on lines 592..599

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

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