GladysProject/Gladys

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

Summary

Maintainability
F
1 wk
Test Coverage

File ActionCard.jsx has 415 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

    const ACTION_ICON = {
      [ACTIONS.LIGHT.TURN_ON]: 'fe fe-toggle-right',
      [ACTIONS.LIGHT.TURN_OFF]: 'fe fe-toggle-left',
      [ACTIONS.LIGHT.TOGGLE]: 'fe fe-shuffle',
      [ACTIONS.LIGHT.BLINK]: 'fe fe-star',
    Severity: Major
    Found in front/src/routes/scene/edit-scene/ActionCard.jsx and 1 other location - About 2 days to fix
    front/src/utils/consts.js on lines 178..208

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

    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 283..294

    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.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 237..248

    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 7 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 6 other locations - About 3 hrs to fix
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 215..225
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 226..236
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 304..314
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 384..394
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 395..405
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 406..416

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

              {props.action.type === ACTIONS.AI.ASK && (
                <AskAI
                  action={props.action}
                  columnIndex={props.columnIndex}
                  index={props.index}
    Severity: Major
    Found in front/src/routes/scene/edit-scene/ActionCard.jsx and 6 other locations - About 3 hrs to fix
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 215..225
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 226..236
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 304..314
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 331..341
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 384..394
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 395..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 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 7 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 6 other locations - About 3 hrs to fix
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 215..225
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 226..236
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 331..341
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 384..394
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 395..405
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 406..416

    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 7 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 6 other locations - About 3 hrs to fix
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 215..225
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 304..314
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 331..341
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 384..394
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 395..405
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 406..416

    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 7 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 6 other locations - About 3 hrs to fix
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 215..225
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 226..236
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 304..314
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 331..341
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 395..405
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 406..416

    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 7 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 6 other locations - About 3 hrs to fix
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 215..225
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 226..236
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 304..314
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 331..341
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 384..394
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 406..416

    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 7 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 6 other locations - About 3 hrs to fix
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 226..236
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 304..314
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 331..341
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 384..394
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 395..405
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 406..416

    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.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 249..258

    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.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 342..351

    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.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 144..151
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 159..166
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 167..174
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 175..182
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 183..190
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 191..198
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 207..214
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 259..266
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 267..274
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 275..282
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 315..322
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 323..330
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 352..359
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 360..367
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 368..375
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 376..383

    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 144..151
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 159..166
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 167..174
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 175..182
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 183..190
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 191..198
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 199..206
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 207..214
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 267..274
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 275..282
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 315..322
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 323..330
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 352..359
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 360..367
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 368..375
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 376..383

    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 144..151
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 159..166
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 167..174
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 183..190
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 191..198
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 199..206
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 207..214
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 259..266
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 267..274
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 275..282
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 315..322
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 323..330
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 352..359
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 360..367
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 368..375
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 376..383

    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 144..151
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 159..166
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 167..174
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 175..182
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 183..190
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 191..198
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 199..206
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 207..214
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 259..266
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 267..274
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 315..322
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 323..330
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 352..359
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 360..367
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 368..375
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 376..383

    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_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 144..151
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 167..174
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 175..182
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 183..190
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 191..198
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 199..206
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 207..214
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 259..266
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 267..274
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 275..282
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 315..322
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 323..330
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 352..359
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 360..367
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 368..375
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 376..383

    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 144..151
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 159..166
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 167..174
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 175..182
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 183..190
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 191..198
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 199..206
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 207..214
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 259..266
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 267..274
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 275..282
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 315..322
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 352..359
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 360..367
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 368..375
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 376..383

    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 144..151
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 159..166
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 167..174
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 175..182
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 183..190
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 191..198
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 199..206
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 207..214
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 259..266
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 267..274
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 275..282
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 323..330
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 352..359
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 360..367
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 368..375
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 376..383

    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 144..151
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 159..166
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 167..174
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 175..182
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 191..198
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 199..206
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 207..214
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 259..266
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 267..274
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 275..282
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 315..322
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 323..330
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 352..359
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 360..367
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 368..375
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 376..383

    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 144..151
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 159..166
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 167..174
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 175..182
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 183..190
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 191..198
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 199..206
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 259..266
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 267..274
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 275..282
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 315..322
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 323..330
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 352..359
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 360..367
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 368..375
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 376..383

    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 144..151
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 159..166
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 167..174
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 175..182
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 183..190
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 191..198
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 199..206
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 207..214
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 259..266
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 267..274
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 275..282
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 315..322
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 323..330
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 352..359
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 368..375
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 376..383

    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 159..166
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 167..174
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 175..182
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 183..190
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 191..198
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 199..206
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 207..214
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 259..266
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 267..274
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 275..282
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 315..322
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 323..330
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 352..359
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 360..367
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 368..375
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 376..383

    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 144..151
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 159..166
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 175..182
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 183..190
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 191..198
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 199..206
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 207..214
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 259..266
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 267..274
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 275..282
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 315..322
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 323..330
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 352..359
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 360..367
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 368..375
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 376..383

    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 144..151
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 159..166
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 167..174
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 175..182
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 183..190
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 191..198
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 199..206
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 207..214
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 259..266
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 267..274
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 275..282
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 315..322
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 323..330
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 360..367
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 368..375
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 376..383

    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 144..151
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 159..166
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 167..174
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 175..182
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 183..190
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 199..206
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 207..214
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 259..266
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 267..274
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 275..282
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 315..322
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 323..330
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 352..359
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 360..367
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 368..375
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 376..383

    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 144..151
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 159..166
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 167..174
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 175..182
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 183..190
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 191..198
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 199..206
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 207..214
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 259..266
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 267..274
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 275..282
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 315..322
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 323..330
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 352..359
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 360..367
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 368..375

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 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 144..151
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 159..166
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 167..174
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 175..182
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 183..190
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 191..198
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 199..206
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 207..214
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 259..266
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 275..282
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 315..322
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 323..330
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 352..359
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 360..367
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 368..375
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 376..383

    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 144..151
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 159..166
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 167..174
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 175..182
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 183..190
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 191..198
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 199..206
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 207..214
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 259..266
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 267..274
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 275..282
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 315..322
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 323..330
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 352..359
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 360..367
    front/src/routes/scene/edit-scene/ActionCard.jsx on lines 376..383

    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.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 109..111

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 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.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 104..106

    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