OpenC3/cosmos

View on GitHub

Showing 842 of 1,379 total issues

Method get_cmd_time has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    def get_cmd_time(target_name = nil, command_name = nil, manual: false, scope: $openc3_scope, token: $openc3_token)
      authorize(permission: 'cmd_info', target_name: target_name, packet_name: command_name, manual: manual, scope: scope, token: token)
      if target_name and command_name
        target_name = target_name.upcase
        command_name = command_name.upcase
Severity: Minor
Found in openc3/lib/openc3/api/cmd_api.rb - About 1 hr to fix

    Method offline_access_needed has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        def offline_access_needed(manual: false, scope: $openc3_scope, token: $openc3_token)
          authorize(permission: 'system', manual: manual, scope: scope, token: token)
          begin
            authorize(permission: 'script_view', manual: manual, scope: scope, token: token)
          rescue
    Severity: Minor
    Found in openc3/lib/openc3/api/offline_access_api.rb - About 1 hr to fix

      Method setup_thread_body has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        def setup_thread_body(objects)
          first_object = objects[0]
      
          # The goal of this mode is to determine if we are starting with files or from
          # realtime
      Severity: Minor
      Found in openc3-cosmos-cmd-tlm-api/app/models/logged_streaming_thread.rb - About 1 hr to fix

        Method sync_with_bucket has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            def self.sync_with_bucket(bucket, scope:)
              # Build catalogs
              local_catalog = build_local_catalog(scope: scope)
              remote_catalog = build_remote_catalog(bucket, scope: scope)
        
        
        Severity: Minor
        Found in openc3/lib/openc3/utilities/local_mode.rb - About 1 hr to fix

          Function _execute_wait has 9 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          def _execute_wait(
          Severity: Major
          Found in openc3/python/openc3/script/api_shared.py - About 1 hr to fix

            Function _openc3_script_wait_tolerance has 9 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            def _openc3_script_wait_tolerance(
            Severity: Major
            Found in openc3/python/openc3/script/api_shared.py - About 1 hr to fix

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

                  def __init__(
              Severity: Major
              Found in openc3/python/openc3/models/scope_model.py - About 1 hr to fix

                Function write_array has 9 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def write_array(
                Severity: Major
                Found in openc3/python/openc3/accessors/binary_accessor.py - About 1 hr to fix

                  Function _openc3_script_wait_tolerance has 9 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  def _openc3_script_wait_tolerance(
                  Severity: Major
                  Found in openc3/python/openc3/api/api_shared.py - About 1 hr to fix

                    Function _execute_wait has 9 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    def _execute_wait(
                    Severity: Major
                    Found in openc3/python/openc3/api/api_shared.py - About 1 hr to fix

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

                          def __init__(
                      Severity: Major
                      Found in openc3/python/openc3/interfaces/protocols/slip_protocol.py - About 1 hr to fix

                        Method _openc3_script_wait_implementation_tolerance has 9 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            def _openc3_script_wait_implementation_tolerance(target_name, packet_name, item_name, value_type, expected_value, tolerance, timeout, polling_rate = DEFAULT_TLM_POLLING_RATE, scope: $openc3_scope, token: $openc3_token, &block)
                        Severity: Major
                        Found in openc3/lib/openc3/script/api_shared.rb - About 1 hr to fix

                          Method initialize has 9 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                                start_char = nil,
                                read_strip_characters = true,
                                read_enable_escaping = true,
                                write_enable_escaping = true,
                                end_char = 0xC0,
                          Severity: Major
                          Found in openc3/lib/openc3/interfaces/protocols/slip_protocol.rb - About 1 hr to fix

                            Method initialize has 9 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                def initialize(write_port_name,
                                               read_port_name,
                                               baud_rate,
                                               parity,
                                               stop_bits,
                            Severity: Major
                            Found in openc3/lib/openc3/interfaces/serial_interface.rb - About 1 hr to fix

                              Method initialize has 9 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                    hostname,
                                    write_dest_port,
                                    read_port,
                                    write_src_port = nil,
                                    interface_address = nil,
                              Severity: Major
                              Found in openc3/lib/openc3/interfaces/udp_interface.rb - About 1 hr to fix

                                Method initialize has 9 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                    def initialize(write_port_name,
                                                   read_port_name,
                                                   baud_rate,
                                                   parity,
                                                   stop_bits,
                                Severity: Major
                                Found in openc3/lib/openc3/streams/serial_stream.rb - About 1 hr to fix

                                  Method initialize has 9 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                        remote_log_directory,
                                        label,
                                        logging_enabled = true,
                                        cycle_time = nil,
                                        cycle_size = 1_000_000_000,
                                  Severity: Major
                                  Found in openc3/lib/openc3/logs/buffered_packet_log_writer.rb - About 1 hr to fix

                                    Function defaultSourceLookup has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    function defaultSourceLookup(filePath) {
                                      try {
                                        filePath = filePath.split(path.sep).join(path.posix.sep)
                                        // Remove any Windows drive letters
                                        filePath = filePath.replace('C:', '')
                                    Severity: Minor
                                    Found in playwright/context.js - About 1 hr to fix

                                      Function diff_linesToCharsMunge_ has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        function diff_linesToCharsMunge_(text) {
                                          var chars = ''
                                          // Walk the text, pulling out a substring for each line.
                                          // text.split('\n') would would temporarily double our memory footprint.
                                          // Modifying text would create many large strings to garbage collect.

                                        Function addConnector has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        function addConnector(
                                          acediff,
                                          leftStartLine,
                                          leftEndLine,
                                          rightStartLine,
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language