GladysProject/Gladys

View on GitHub
front/src/routes/scene/edit-scene/ActionCard.jsx

Summary

Maintainability
F
1 wk
Test Coverage

File ActionCard.jsx has 402 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { h } from 'preact';
import { Text } from 'preact-i18n';
import cx from 'classnames';
import { useRef } from 'preact/hooks';
import { useDrag, useDrop } from 'react-dnd';
Severity: Minor
Found in front/src/routes/scene/edit-scene/ActionCard.jsx - About 5 hrs to fix

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

              {props.action.type === ACTIONS.HTTP.REQUEST && (
                <HttpRequest
                  action={props.action}
                  columnIndex={props.columnIndex}
                  index={props.index}
    Severity: Major
    Found in front/src/routes/scene/edit-scene/ActionCard.jsx and 1 other location - About 4 hrs to fix
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 235..246

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

    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

              {props.action.type === ACTIONS.CONDITION.ONLY_CONTINUE_IF && (
                <OnlyContinueIfParams
                  action={props.action}
                  columnIndex={props.columnIndex}
                  index={props.index}
    Severity: Major
    Found in front/src/routes/scene/edit-scene/ActionCard.jsx and 1 other location - About 4 hrs to fix
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 281..292

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

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

              {props.action.type === ACTIONS.DEVICE.SET_VALUE && (
                <DeviceSetValue
                  action={props.action}
                  columnIndex={props.columnIndex}
                  index={props.index}
    Severity: Major
    Found in front/src/routes/scene/edit-scene/ActionCard.jsx and 5 other locations - About 3 hrs to fix
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 213..223
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 224..234
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 302..312
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 382..392
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 393..403

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

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

              {props.action.type === ACTIONS.MUSIC.PLAY_NOTIFICATION && (
                <PlayNotification
                  action={props.action}
                  columnIndex={props.columnIndex}
                  index={props.index}
    Severity: Major
    Found in front/src/routes/scene/edit-scene/ActionCard.jsx and 5 other locations - About 3 hrs to fix
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 213..223
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 224..234
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 302..312
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 329..339
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 382..392

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

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

              {props.action.type === ACTIONS.MESSAGE.SEND_CAMERA && (
                <SendMessageCameraParams
                  action={props.action}
                  columnIndex={props.columnIndex}
                  index={props.index}
    Severity: Major
    Found in front/src/routes/scene/edit-scene/ActionCard.jsx and 5 other locations - About 3 hrs to fix
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 213..223
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 302..312
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 329..339
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 382..392
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 393..403

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

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

              {props.action.type === ACTIONS.MESSAGE.SEND && (
                <SendMessageParams
                  action={props.action}
                  columnIndex={props.columnIndex}
                  index={props.index}
    Severity: Major
    Found in front/src/routes/scene/edit-scene/ActionCard.jsx and 5 other locations - About 3 hrs to fix
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 224..234
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 302..312
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 329..339
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 382..392
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 393..403

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

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

              {props.action.type === ACTIONS.MQTT.SEND && (
                <SendMqttMessage
                  action={props.action}
                  columnIndex={props.columnIndex}
                  index={props.index}
    Severity: Major
    Found in front/src/routes/scene/edit-scene/ActionCard.jsx and 5 other locations - About 3 hrs to fix
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 213..223
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 224..234
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 302..312
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 329..339
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 393..403

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

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

              {props.action.type === ACTIONS.SCENE.START && (
                <StartSceneParams
                  action={props.action}
                  columnIndex={props.columnIndex}
                  index={props.index}
    Severity: Major
    Found in front/src/routes/scene/edit-scene/ActionCard.jsx and 5 other locations - About 3 hrs to fix
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 213..223
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 224..234
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 329..339
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 382..392
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 393..403

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

    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 [{ isActive }, drop] = useDrop({
        accept: ACTION_CARD_TYPE,
        collect: monitor => ({
          isActive: monitor.canDrop() && monitor.isOver()
        }),
    Severity: Major
    Found in front/src/routes/scene/edit-scene/ActionCard.jsx and 1 other location - About 3 hrs to fix
    front/src/components/boxs/baseEditBox.jsx on lines 19..30

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

    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

              {props.action.type === ACTIONS.DEVICE.GET_VALUE && (
                <DeviceGetValueParams
                  action={props.action}
                  columnIndex={props.columnIndex}
                  index={props.index}
    Severity: Major
    Found in front/src/routes/scene/edit-scene/ActionCard.jsx and 1 other location - About 3 hrs to fix
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 340..349

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

    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

              {props.action.type === ACTIONS.CALENDAR.IS_EVENT_RUNNING && (
                <CalendarIsEventRunning
                  action={props.action}
                  columnIndex={props.columnIndex}
                  index={props.index}
    Severity: Major
    Found in front/src/routes/scene/edit-scene/ActionCard.jsx and 1 other location - About 3 hrs to fix
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 247..256

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

    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

              {props.action.type === ACTIONS.CONDITION.CHECK_TIME && (
                <CheckTime
                  action={props.action}
                  columnIndex={props.columnIndex}
                  index={props.index}
    Severity: Major
    Found in front/src/routes/scene/edit-scene/ActionCard.jsx and 1 other location - About 2 hrs to fix
    front/src/routes/scene/edit-scene/TriggerCard.jsx on lines 147..155

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

    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 [{ isDragging }, drag, preview] = useDrag(() => ({
        type: ACTION_CARD_TYPE,
        item: () => {
          return { x, y };
        },
    Severity: Major
    Found in front/src/routes/scene/edit-scene/ActionCard.jsx and 1 other location - About 2 hrs to fix
    front/src/components/boxs/baseEditBox.jsx on lines 10..18

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

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

              {props.action.type === ACTIONS.LIGHT.TURN_ON && (
                <TurnOnOffLightParams
                  action={props.action}
                  columnIndex={props.columnIndex}
                  index={props.index}
    Severity: Major
    Found in front/src/routes/scene/edit-scene/ActionCard.jsx and 16 other locations - About 2 hrs to fix
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 142..149
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 165..172
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 173..180
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 181..188
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 189..196
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 197..204
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 205..212
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 257..264
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 265..272
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 273..280
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 313..320
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 321..328
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 350..357
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 358..365
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 366..373
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 374..381

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

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

              {props.action.type === ACTIONS.SWITCH.TURN_ON && (
                <TurnOnOffSwitchParams
                  action={props.action}
                  columnIndex={props.columnIndex}
                  index={props.index}
    Severity: Major
    Found in front/src/routes/scene/edit-scene/ActionCard.jsx and 16 other locations - About 2 hrs to fix
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 142..149
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 157..164
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 165..172
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 173..180
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 181..188
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 197..204
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 205..212
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 257..264
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 265..272
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 273..280
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 313..320
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 321..328
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 350..357
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 358..365
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 366..373
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 374..381

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

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

              {props.action.type === ACTIONS.SWITCH.TURN_OFF && (
                <TurnOnOffSwitchParams
                  action={props.action}
                  columnIndex={props.columnIndex}
                  index={props.index}
    Severity: Major
    Found in front/src/routes/scene/edit-scene/ActionCard.jsx and 16 other locations - About 2 hrs to fix
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 142..149
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 157..164
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 165..172
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 173..180
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 181..188
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 189..196
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 205..212
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 257..264
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 265..272
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 273..280
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 313..320
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 321..328
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 350..357
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 358..365
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 366..373
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 374..381

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

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

              {props.action.type === ACTIONS.USER.CHECK_PRESENCE && (
                <CheckUserPresence
                  action={props.action}
                  columnIndex={props.columnIndex}
                  index={props.index}
    Severity: Major
    Found in front/src/routes/scene/edit-scene/ActionCard.jsx and 16 other locations - About 2 hrs to fix
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 142..149
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 157..164
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 165..172
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 173..180
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 181..188
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 189..196
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 197..204
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 205..212
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 257..264
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 273..280
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 313..320
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 321..328
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 350..357
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 358..365
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 366..373
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 374..381

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

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

              {props.action.type === ACTIONS.ALARM.CHECK_ALARM_MODE && (
                <CheckAlarmMode
                  action={props.action}
                  columnIndex={props.columnIndex}
                  index={props.index}
    Severity: Major
    Found in front/src/routes/scene/edit-scene/ActionCard.jsx and 16 other locations - About 2 hrs to fix
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 142..149
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 157..164
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 165..172
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 173..180
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 181..188
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 189..196
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 197..204
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 205..212
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 257..264
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 265..272
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 273..280
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 313..320
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 321..328
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 350..357
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 358..365
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 374..381

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

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

              {props.action.type === ACTIONS.LIGHT.BLINK && (
                <BlinkLightParams
                  action={props.action}
                  columnIndex={props.columnIndex}
                  index={props.index}
    Severity: Major
    Found in front/src/routes/scene/edit-scene/ActionCard.jsx and 16 other locations - About 2 hrs to fix
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 142..149
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 157..164
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 165..172
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 173..180
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 189..196
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 197..204
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 205..212
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 257..264
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 265..272
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 273..280
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 313..320
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 321..328
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 350..357
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 358..365
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 366..373
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 374..381

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

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

              {props.action.type === ACTIONS.SWITCH.TOGGLE && (
                <TurnOnOffSwitchParams
                  action={props.action}
                  columnIndex={props.columnIndex}
                  index={props.index}
    Severity: Major
    Found in front/src/routes/scene/edit-scene/ActionCard.jsx and 16 other locations - About 2 hrs to fix
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 142..149
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 157..164
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 165..172
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 173..180
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 181..188
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 189..196
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 197..204
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 257..264
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 265..272
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 273..280
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 313..320
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 321..328
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 350..357
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 358..365
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 366..373
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 374..381

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

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

              {props.action.type === ACTIONS.ALARM.SET_ALARM_MODE && (
                <SetAlarmMode
                  action={props.action}
                  columnIndex={props.columnIndex}
                  index={props.index}
    Severity: Major
    Found in front/src/routes/scene/edit-scene/ActionCard.jsx and 16 other locations - About 2 hrs to fix
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 142..149
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 157..164
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 165..172
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 173..180
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 181..188
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 189..196
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 197..204
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 205..212
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 257..264
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 265..272
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 273..280
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 313..320
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 321..328
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 350..357
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 358..365
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 366..373

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

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

              {props.action.type === ACTIONS.TIME.DELAY && (
                <DelayActionParams
                  action={props.action}
                  columnIndex={props.columnIndex}
                  index={props.index}
    Severity: Major
    Found in front/src/routes/scene/edit-scene/ActionCard.jsx and 16 other locations - About 2 hrs to fix
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 157..164
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 165..172
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 173..180
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 181..188
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 189..196
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 197..204
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 205..212
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 257..264
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 265..272
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 273..280
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 313..320
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 321..328
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 350..357
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 358..365
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 366..373
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 374..381

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

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

              {props.action.type === ACTIONS.USER.SET_OUT_OF_HOME && (
                <UserPresence
                  action={props.action}
                  columnIndex={props.columnIndex}
                  index={props.index}
    Severity: Major
    Found in front/src/routes/scene/edit-scene/ActionCard.jsx and 16 other locations - About 2 hrs to fix
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 142..149
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 157..164
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 165..172
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 173..180
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 181..188
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 189..196
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 197..204
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 205..212
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 257..264
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 265..272
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 313..320
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 321..328
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 350..357
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 358..365
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 366..373
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 374..381

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

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

              {props.action.type === ACTIONS.ECOWATT.CONDITION && (
                <EcowattCondition
                  action={props.action}
                  columnIndex={props.columnIndex}
                  index={props.index}
    Severity: Major
    Found in front/src/routes/scene/edit-scene/ActionCard.jsx and 16 other locations - About 2 hrs to fix
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 142..149
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 157..164
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 165..172
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 173..180
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 181..188
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 189..196
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 197..204
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 205..212
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 257..264
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 265..272
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 273..280
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 313..320
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 321..328
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 358..365
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 366..373
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 374..381

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

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

              {props.action.type === ACTIONS.HOUSE.IS_EMPTY && (
                <HouseEmptyOrNotCondition
                  action={props.action}
                  columnIndex={props.columnIndex}
                  index={props.index}
    Severity: Major
    Found in front/src/routes/scene/edit-scene/ActionCard.jsx and 16 other locations - About 2 hrs to fix
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 142..149
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 157..164
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 165..172
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 173..180
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 181..188
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 189..196
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 197..204
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 205..212
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 257..264
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 265..272
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 273..280
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 321..328
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 350..357
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 358..365
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 366..373
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 374..381

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

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

              {props.action.type === ACTIONS.EDF_TEMPO.CONDITION && (
                <EdfTempoCondition
                  action={props.action}
                  columnIndex={props.columnIndex}
                  index={props.index}
    Severity: Major
    Found in front/src/routes/scene/edit-scene/ActionCard.jsx and 16 other locations - About 2 hrs to fix
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 142..149
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 157..164
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 165..172
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 173..180
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 181..188
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 189..196
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 197..204
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 205..212
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 257..264
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 265..272
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 273..280
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 313..320
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 321..328
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 350..357
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 366..373
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 374..381

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

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

              {props.action.type === ACTIONS.LIGHT.TURN_OFF && (
                <TurnOnOffLightParams
                  action={props.action}
                  columnIndex={props.columnIndex}
                  index={props.index}
    Severity: Major
    Found in front/src/routes/scene/edit-scene/ActionCard.jsx and 16 other locations - About 2 hrs to fix
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 142..149
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 157..164
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 173..180
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 181..188
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 189..196
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 197..204
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 205..212
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 257..264
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 265..272
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 273..280
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 313..320
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 321..328
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 350..357
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 358..365
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 366..373
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 374..381

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

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

              {props.action.type === ACTIONS.HOUSE.IS_NOT_EMPTY && (
                <HouseEmptyOrNotCondition
                  action={props.action}
                  columnIndex={props.columnIndex}
                  index={props.index}
    Severity: Major
    Found in front/src/routes/scene/edit-scene/ActionCard.jsx and 16 other locations - About 2 hrs to fix
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 142..149
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 157..164
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 165..172
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 173..180
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 181..188
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 189..196
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 197..204
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 205..212
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 257..264
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 265..272
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 273..280
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 313..320
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 350..357
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 358..365
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 366..373
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 374..381

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

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

              {props.action.type === ACTIONS.LIGHT.TOGGLE && (
                <TurnOnOffLightParams
                  action={props.action}
                  columnIndex={props.columnIndex}
                  index={props.index}
    Severity: Major
    Found in front/src/routes/scene/edit-scene/ActionCard.jsx and 16 other locations - About 2 hrs to fix
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 142..149
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 157..164
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 165..172
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 181..188
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 189..196
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 197..204
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 205..212
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 257..264
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 265..272
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 273..280
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 313..320
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 321..328
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 350..357
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 358..365
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 366..373
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 374..381

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

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

              {props.action.type === ACTIONS.USER.SET_SEEN_AT_HOME && (
                <UserPresence
                  action={props.action}
                  columnIndex={props.columnIndex}
                  index={props.index}
    Severity: Major
    Found in front/src/routes/scene/edit-scene/ActionCard.jsx and 16 other locations - About 2 hrs to fix
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 142..149
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 157..164
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 165..172
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 173..180
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 181..188
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 189..196
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 197..204
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 205..212
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 265..272
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 273..280
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 313..320
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 321..328
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 350..357
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 358..365
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 366..373
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 374..381

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

    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

              props.action.type !== ACTIONS.CONDITION.ONLY_CONTINUE_IF &&
              props.action.type !== ACTIONS.MESSAGE.SEND &&
              props.action.type !== ACTIONS.CALENDAR.IS_EVENT_RUNNING
    Severity: Major
    Found in front/src/routes/scene/edit-scene/ActionCard.jsx and 1 other location - About 1 hr to fix
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 102..104

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

    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

              props.action.type === ACTIONS.MESSAGE.SEND ||
              props.action.type === ACTIONS.CALENDAR.IS_EVENT_RUNNING ||
              props.action.type === ACTIONS.MQTT.SEND ||
    Severity: Major
    Found in front/src/routes/scene/edit-scene/ActionCard.jsx and 1 other location - About 1 hr to fix
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 107..109

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

    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