GladysProject/Gladys

View on GitHub

Showing 1,934 of 2,694 total issues

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

    EASD04: {
      feature: {
        category: DEVICE_FEATURE_CATEGORIES.ENERGY_SENSOR,
        type: DEVICE_FEATURE_TYPES.ENERGY_SENSOR.INDEX,
        unit: DEVICE_FEATURE_UNITS.KILOWATT_HOUR,
Severity: Major
Found in server/services/zigbee2mqtt/exposes/numericType.js and 24 other locations - About 55 mins to fix
server/services/zigbee2mqtt/exposes/numericType.js on lines 27..35
server/services/zigbee2mqtt/exposes/numericType.js on lines 36..44
server/services/zigbee2mqtt/exposes/numericType.js on lines 70..78
server/services/zigbee2mqtt/exposes/numericType.js on lines 87..95
server/services/zigbee2mqtt/exposes/numericType.js on lines 96..104
server/services/zigbee2mqtt/exposes/numericType.js on lines 143..151
server/services/zigbee2mqtt/exposes/numericType.js on lines 152..160
server/services/zigbee2mqtt/exposes/numericType.js on lines 282..290
server/services/zigbee2mqtt/exposes/numericType.js on lines 291..299
server/services/zigbee2mqtt/exposes/numericType.js on lines 300..308
server/services/zigbee2mqtt/exposes/numericType.js on lines 309..317
server/services/zigbee2mqtt/exposes/numericType.js on lines 318..326
server/services/zigbee2mqtt/exposes/numericType.js on lines 327..335
server/services/zigbee2mqtt/exposes/numericType.js on lines 336..344
server/services/zigbee2mqtt/exposes/numericType.js on lines 345..353
server/services/zigbee2mqtt/exposes/numericType.js on lines 354..362
server/services/zigbee2mqtt/exposes/numericType.js on lines 363..371
server/services/zigbee2mqtt/exposes/numericType.js on lines 372..380
server/services/zigbee2mqtt/exposes/numericType.js on lines 500..508
server/services/zigbee2mqtt/exposes/numericType.js on lines 509..517
server/services/zigbee2mqtt/exposes/numericType.js on lines 518..526
server/services/zigbee2mqtt/exposes/numericType.js on lines 737..745
server/services/zigbee2mqtt/exposes/numericType.js on lines 746..754
server/services/zigbee2mqtt/exposes/numericType.js on lines 755..763

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

                {props.forgotPasswordStatus === ForgotPasswordStatus.UserNotFound && (
                  <div class="alert alert-danger" role="alert">
                    <Text id="forgotPassword.userNotFound" />
                  </div>
                )}
Severity: Major
Found in front/src/routes/forgot-password/ForgotPasswordPage.jsx and 12 other locations - About 55 mins to fix
front/src/components/gateway/GatewayLoginForm.jsx on lines 20..24
front/src/components/gateway/GatewayLoginForm.jsx on lines 25..29
front/src/components/gateway/GatewayLoginForm.jsx on lines 38..42
front/src/components/gateway/GatewayLoginForm.jsx on lines 43..47
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 32..36
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 38..42
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 50..54
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 56..60
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 22..26
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 28..32
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 34..38
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 40..44

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

        features: [
          {
            name: 'SP2',
            category: 'switch',
            type: 'binary',
Severity: Major
Found in front/src/config/demo.js and 4 other locations - About 55 mins to fix
front/cypress/e2e/routes/integration/broadlink/devices/BroadlinkDeviceList.cy.js on lines 15..27
front/cypress/e2e/routes/integration/broadlink/devices/BroadlinkEditRemote.cy.js on lines 17..29
front/cypress/e2e/routes/integration/broadlink/devices/BroadlinkEditRemoteSkipAll.cy.js on lines 17..29
front/src/config/demo.js on lines 1468..1480

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

      features: [
        {
          name: 'SP2',
          category: 'switch',
          type: 'binary',
front/cypress/e2e/routes/integration/broadlink/devices/BroadlinkEditRemote.cy.js on lines 17..29
front/cypress/e2e/routes/integration/broadlink/devices/BroadlinkEditRemoteSkipAll.cy.js on lines 17..29
front/src/config/demo.js on lines 1392..1404
front/src/config/demo.js on lines 1468..1480

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

class SettingsServices extends Component {
  componentWillMount() {
    this.props.getServices();
  }

Severity: Major
Found in front/src/routes/settings/settings-service/index.js and 3 other locations - About 55 mins to fix
front/src/routes/scene/new-scene/index.js on lines 6..14
front/src/routes/settings/settings-house/index.js on lines 6..14
front/src/routes/settings/settings-session/index.js on lines 6..14

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

class NewScene extends Component {
  componentDidMount() {
    this.props.initScene();
  }

Severity: Major
Found in front/src/routes/scene/new-scene/index.js and 3 other locations - About 55 mins to fix
front/src/routes/settings/settings-house/index.js on lines 6..14
front/src/routes/settings/settings-service/index.js on lines 6..14
front/src/routes/settings/settings-session/index.js on lines 6..14

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

      features: [
        {
          name: 'Power',
          external_id: 'broadlink:8008bda3ae44:binary',
          selector: 'broadlink-8008bda3ae44-binary',
front/cypress/e2e/routes/integration/broadlink/devices/BroadlinkDeviceList.cy.js on lines 15..27
front/cypress/e2e/routes/integration/broadlink/devices/BroadlinkEditRemoteSkipAll.cy.js on lines 17..29
front/src/config/demo.js on lines 1392..1404
front/src/config/demo.js on lines 1468..1480

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    if (error) {
      this.setState({
        nodeRedStatus: RequestStatus.Error
      });
    } else {
front/src/routes/integration/all/node-red/setup-page/SetupTab.jsx on lines 88..96

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    if (error) {
      this.setState({
        nodeRedStatus: RequestStatus.Error
      });
    } else {
front/src/routes/integration/all/node-red/setup-page/SetupTab.jsx on lines 113..121

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

      features: [
        {
          name: 'Power',
          external_id: 'broadlink:8008bda3ae44:binary',
          selector: 'broadlink-8008bda3ae44-binary',
front/cypress/e2e/routes/integration/broadlink/devices/BroadlinkDeviceList.cy.js on lines 15..27
front/cypress/e2e/routes/integration/broadlink/devices/BroadlinkEditRemote.cy.js on lines 17..29
front/src/config/demo.js on lines 1392..1404
front/src/config/demo.js on lines 1468..1480

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

      features: [
        {
          name: 'sp2',
          category: 'switch',
          type: 'binary',
Severity: Major
Found in front/src/config/demo.js and 4 other locations - About 55 mins to fix
front/cypress/e2e/routes/integration/broadlink/devices/BroadlinkDeviceList.cy.js on lines 15..27
front/cypress/e2e/routes/integration/broadlink/devices/BroadlinkEditRemote.cy.js on lines 17..29
front/cypress/e2e/routes/integration/broadlink/devices/BroadlinkEditRemoteSkipAll.cy.js on lines 17..29
front/src/config/demo.js on lines 1392..1404

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

class SettingsSessions extends Component {
  componentWillMount() {
    this.props.getSessions();
  }

Severity: Major
Found in front/src/routes/settings/settings-session/index.js and 3 other locations - About 55 mins to fix
front/src/routes/scene/new-scene/index.js on lines 6..14
front/src/routes/settings/settings-house/index.js on lines 6..14
front/src/routes/settings/settings-service/index.js on lines 6..14

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

class SettingsHouses extends Component {
  componentWillMount() {
    this.props.getHouses();
  }

Severity: Major
Found in front/src/routes/settings/settings-house/index.js and 3 other locations - About 55 mins to fix
front/src/routes/scene/new-scene/index.js on lines 6..14
front/src/routes/settings/settings-service/index.js on lines 6..14
front/src/routes/settings/settings-session/index.js on lines 6..14

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

  updateDeviceProperty(property, value) {
    const device = update(this.state.device, {
      [property]: {
        $set: value
      }
Severity: Minor
Found in front/src/components/device/index.js and 1 other location - About 55 mins to fix
front/src/routes/integration/all/broadlink/remote-page/RemoteCreation.jsx on lines 44..51

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

  [DEVICE_FEATURE_CATEGORIES.SHUTTER]: {
    [DEVICE_FEATURE_TYPES.SHUTTER.STATE]: {
      feature: {
        min: -1,
        max: 1
front/src/routes/integration/all/broadlink/remote-page/features.js on lines 4..12

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

        {!props.isFirstPage && (
          <button class="btn btn-secondary" onClick={props.loadPreviousPage}>
            <Text id="jobsSettings.previous" />
          </button>
        )}
Severity: Minor
Found in front/src/routes/settings/settings-background-jobs/JobList.jsx and 1 other location - About 55 mins to fix
front/src/routes/settings/settings-background-jobs/JobList.jsx on lines 82..86

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

        start: dayjs(eventRaw.start)
          .tz(self.timezone)
          .locale(eventRaw.calendar.creator.language)
          .format('LLL'),
Severity: Minor
Found in server/lib/scene/scene.actions.js and 1 other location - About 55 mins to fix
server/lib/scene/scene.actions.js on lines 446..449

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

        end: dayjs(eventRaw.end)
          .tz(this.timezone)
          .locale(eventRaw.calendar.creator.language)
          .format('LLL'),
Severity: Minor
Found in server/lib/scene/scene.checkCalendarTriggers.js and 1 other location - About 55 mins to fix
server/lib/scene/scene.checkCalendarTriggers.js on lines 115..118

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

                    <input
                      type="checkbox"
                      name="active"
                      value="1"
                      className="custom-switch-input"
Severity: Minor
Found in front/src/routes/scene/edit-scene/EditScenePage.jsx and 1 other location - About 55 mins to fix
front/src/components/boxs/camera/EditCamera.jsx on lines 64..71

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

        end: dayjs(eventRaw.end)
          .tz(self.timezone)
          .locale(eventRaw.calendar.creator.language)
          .format('LLL'),
Severity: Minor
Found in server/lib/scene/scene.actions.js and 1 other location - About 55 mins to fix
server/lib/scene/scene.actions.js on lines 442..445

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language