OpenC3/cosmos

View on GitHub
openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js

Summary

Maintainability
F
6 days
Test Coverage

Function exec has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  async exec(
    method,
    params,
    kwparams = {},
    headerOptions = {},

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

      async tlm(target_name, packet_name, item_name, value_type = 'CONVERTED') {
        let data = null
        // Check for the single string syntax: tlm("TGT PKT ITEM")
        if (packet_name === undefined) {
          data = await this.exec('tlm', [target_name])
    openc3/templates/tool_svelte/src/services/openc3-api.js on lines 285..312

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

    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

      async get_tlm_packet(target_name, packet_name, value_type, stale_time = 30) {
        const data = await this.exec('get_tlm_packet', [target_name, packet_name], {
          type: value_type,
          stale_time: stale_time,
        })
    openc3/templates/tool_svelte/src/services/openc3-api.js on lines 239..256

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 157.

    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

      async hashString(string) {
        if (window.isSecureContext) {
          // Encode the string as an arrayBuffer which the subtle crypto API uses
          const arrayBuffer = new TextEncoder().encode(string)
          // Use the subtle crypto API to perform a SHA256 Sum of the array buffer
    openc3/templates/tool_svelte/src/services/openc3-api.js on lines 585..605

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 143.

    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

      _cmd(method, target_name, command_name, param_list, headerOptions) {
        let converted = null
        for (let key in param_list) {
          if (Object.prototype.hasOwnProperty.call(param_list, key)) {
            converted = this.encode_openc3_type(param_list[key])
    openc3/templates/tool_svelte/src/services/openc3-api.js on lines 386..402

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

    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

      decode_openc3_type(val) {
        if (val !== null && typeof val === 'object') {
          if (val.json_class == 'Float' && val.raw) {
            if (val.raw == 'NaN') {
              return NaN
    openc3/templates/tool_svelte/src/services/openc3-api.js on lines 92..105

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 114.

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

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

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

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

    Refactorings

    Further Reading

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

      ensure_offline_access() {
        this.offline_access_needed().then((needed) => {
          if (needed) {
            if (localStorage.openc3OfflineToken) {
              this.set_offline_access(localStorage.openc3OfflineToken).then(() => {
    openc3/templates/tool_svelte/src/services/openc3-api.js on lines 118..130

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

    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

      encode_openc3_type(val) {
        if (Number.isNaN(val)) {
          return { json_class: 'Float', raw: 'NaN' }
        } else if (val == Number.POSITIVE_INFINITY) {
          return { json_class: 'Float', raw: 'Infinity' }
    openc3/templates/tool_svelte/src/services/openc3-api.js on lines 107..116

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

    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

        for (let i = 0; i < len; i++) {
          converted = this.decode_openc3_type(data[0][i])
          if (converted !== null) {
            data[0][i] = converted
          }
    openc3/templates/tool_svelte/src/services/openc3-api.js on lines 272..277

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

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

      cmd_no_hazardous_check(
        target_name,
        command_name,
        param_list,
        headerOptions = {},
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 464..476
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 478..490
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 492..509
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 511..523
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 525..542
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 563..575
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 577..599
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 601..613
    openc3/templates/tool_svelte/src/services/openc3-api.js on lines 417..429

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

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

      cmd_raw(target_name, command_name, param_list, headerOptions = {}) {
        if (command_name === undefined) {
          return this.exec('cmd_raw', target_name, {}, headerOptions)
        } else {
          return this._cmd(
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 464..476
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 478..490
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 492..509
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 525..542
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 544..561
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 563..575
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 577..599
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 601..613
    openc3/templates/tool_svelte/src/services/openc3-api.js on lines 417..429

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

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

      get_cmd_hazardous(target_name, command_name, param_list, headerOptions = {}) {
        if (command_name === undefined) {
          return this.exec('get_cmd_hazardous', target_name, {}, headerOptions)
        } else {
          return this._cmd(
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 478..490
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 492..509
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 511..523
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 525..542
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 544..561
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 563..575
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 577..599
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 601..613
    openc3/templates/tool_svelte/src/services/openc3-api.js on lines 417..429

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

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

      cmd_no_range_check(
        target_name,
        command_name,
        param_list,
        headerOptions = {},
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 464..476
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 478..490
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 511..523
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 525..542
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 544..561
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 563..575
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 577..599
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 601..613
    openc3/templates/tool_svelte/src/services/openc3-api.js on lines 417..429

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

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

      cmd_no_checks(target_name, command_name, param_list, headerOptions = {}) {
        if (command_name === undefined) {
          return this.exec('cmd_no_checks', target_name, {}, headerOptions)
        } else {
          return this._cmd(
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 464..476
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 478..490
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 492..509
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 511..523
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 525..542
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 544..561
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 577..599
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 601..613
    openc3/templates/tool_svelte/src/services/openc3-api.js on lines 417..429

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

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

      cmd(target_name, command_name, param_list, headerOptions = {}) {
        if (command_name === undefined) {
          return this.exec('cmd', target_name, {}, headerOptions)
        } else {
          return this._cmd(
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 464..476
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 492..509
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 511..523
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 525..542
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 544..561
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 563..575
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 577..599
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 601..613
    openc3/templates/tool_svelte/src/services/openc3-api.js on lines 417..429

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

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

      cmd_raw_no_hazardous_check(
        target_name,
        command_name,
        param_list,
        headerOptions = {},
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 464..476
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 478..490
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 492..509
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 511..523
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 525..542
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 544..561
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 563..575
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 601..613
    openc3/templates/tool_svelte/src/services/openc3-api.js on lines 417..429

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

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

      cmd_raw_no_range_check(
        target_name,
        command_name,
        param_list,
        headerOptions = {},
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 464..476
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 478..490
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 492..509
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 511..523
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 544..561
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 563..575
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 577..599
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 601..613
    openc3/templates/tool_svelte/src/services/openc3-api.js on lines 417..429

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

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

      cmd_raw_no_checks(target_name, command_name, param_list, headerOptions = {}) {
        if (command_name === undefined) {
          return this.exec('cmd_raw_no_checks', target_name, {}, headerOptions)
        } else {
          return this._cmd(
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 464..476
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 478..490
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 492..509
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 511..523
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 525..542
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 544..561
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 563..575
    openc3-cosmos-init/plugins/packages/openc3-tool-common/src/services/openc3-api.js on lines 577..599
    openc3/templates/tool_svelte/src/services/openc3-api.js on lines 417..429

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

    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

      connect_interface(interface_name, ...interface_params) {
        if (interface_params.length > 0) {
          return this.exec('connect_interface', [
            interface_name,
            ...interface_params,
    openc3/templates/tool_svelte/src/services/openc3-api.js on lines 152..161

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 62.

    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

      async inject_tlm(
        target_name,
        packet_name,
        item_hash = null,
        value_type = 'CONVERTED',
    openc3/templates/tool_svelte/src/services/openc3-api.js on lines 314..327

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 49.

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

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

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

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

    Refactorings

    Further Reading

    There are no issues that match your filters.

    Category
    Status