OpenC3/cosmos

View on GitHub

Showing 842 of 1,379 total issues

Method spawn has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

  def self.spawn(scope, name, suite_runner = nil, disconnect = false, environment = nil, user_full_name = nil, username = nil)
Severity: Major
Found in openc3-cosmos-script-runner-api/app/models/running_script.rb - About 50 mins to fix

    Avoid deeply nested control flow statements.
    Open

                for (const param of lineObj.mnemonic.params) {
                  if (!items.some((item) => item === param)) {
                    problemLines.push({
                      ...lineObj,
                      error: `Command "${target} ${packet}" param "${param}" does not exist.`,

      Avoid deeply nested control flow statements.
      Open

                for (var y = 0; y < patches[x].diffs.length; y++) {
                  var mod = patches[x].diffs[y]
                  if (mod[0] !== DIFF_EQUAL) {
                    index2 = this.diff_xIndex(diffs, index1)
                  }

        Avoid deeply nested control flow statements.
        Open

                                if msg_type == "disconnect":
                                    if json_hash["reason"] == "unauthorized":
                                        raise RuntimeError("Unauthorized")
                                if msg_type == "reject_subscription":
        Severity: Major
        Found in openc3/python/openc3/script/web_socket_api.py - About 45 mins to fix

          Function _log_cmd has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          def _log_cmd(target_name, cmd_name, cmd_params, raw, no_range, no_hazardous):
          Severity: Minor
          Found in openc3/python/openc3/script/commands.py - About 45 mins to fix

            Function build_cmd has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def build_cmd(cls, target_name, cmd_name, cmd_params, range_check, raw, scope=OPENC3_SCOPE):
            Severity: Minor
            Found in openc3/python/openc3/topics/decom_interface_topic.py - About 45 mins to fix

              Function __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def __init__(
              Severity: Minor
              Found in openc3/python/openc3/script/web_socket_api.py - About 45 mins to fix

                Function __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def __init__(
                Severity: Minor
                Found in openc3/python/openc3/script/web_socket_api.py - About 45 mins to fix

                  Function prompt has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  def prompt(
                  Severity: Minor
                  Found in openc3/python/openc3/script/__init__.py - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                if (commonlength !== 0) {
                                  if (
                                    pointer - count_delete - count_insert > 0 &&
                                    diffs[pointer - count_delete - count_insert - 1][0] ==
                                      DIFF_EQUAL

                      Function protocol_cmd has 6 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          def protocol_cmd(
                      Severity: Minor
                      Found in openc3/python/openc3/topics/router_topic.py - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                    if (!items.some((item) => item === lineObj.mnemonic.item)) {
                                      problemLines.push({
                                        ...lineObj,
                                        error: `Item "${target} ${packet} ${lineObj.mnemonic.item}" does not exist.`,
                                      })

                          Avoid deeply nested control flow statements.
                          Open

                                    if (x1 >= x2) {
                                      // Overlap detected.
                                      return this.diff_bisectSplit_(text1, text2, x1, y1, deadline)
                                    }

                            Avoid deeply nested control flow statements.
                            Open

                                        if (commonlength !== 0) {
                                          diffs[pointer][1] =
                                            text_insert.substring(text_insert.length - commonlength) +
                                            diffs[pointer][1]
                                          text_insert = text_insert.substring(

                              Function protocol_cmd has 6 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                  def protocol_cmd(
                              Severity: Minor
                              Found in openc3/python/openc3/topics/interface_topic.py - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                            if (nibble.length < 2) {
                                              nibble = '0' + nibble
                                            }

                                  Avoid deeply nested control flow statements.
                                  Open

                                            if (best_loc > loc) {
                                              // When passing loc, don't exceed our current distance from loc.
                                              start = Math.max(1, 2 * loc - best_loc)
                                            } else {
                                              // Already passed loc, downhill from here on in.

                                    Avoid deeply nested control flow statements.
                                    Open

                                              if (diff_text == bigpatch.diffs[0][1]) {
                                                bigpatch.diffs.shift()
                                              } else {
                                                bigpatch.diffs[0][1] = bigpatch.diffs[0][1].substring(
                                                  diff_text.length,

                                      Function __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                          def __init__(
                                      Severity: Minor
                                      Found in openc3/python/openc3/script/web_socket_api.py - About 45 mins to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                                  if (x1 >= x2) {
                                                    // Overlap detected.
                                                    return this.diff_bisectSplit_(text1, text2, x1, y1, deadline)
                                                  }
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language