OpenC3/cosmos

View on GitHub

Showing 1,379 of 1,379 total issues

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

    def initialize(name, bit_offset, bit_size, data_type, endianness, array_size = nil, overflow = :ERROR)
Severity: Major
Found in openc3/lib/openc3/packets/packet_item.rb - About 50 mins to fix

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

        def _execute_wait(target_name, packet_name, item_name, value_type, comparison_to_eval, timeout, polling_rate, quiet: false, scope: $openc3_scope, token: $openc3_token)
    Severity: Major
    Found in openc3/lib/openc3/script/api_shared.rb - About 50 mins to fix

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

            hostname,
            write_port,
            read_port,
            write_timeout,
            read_timeout,
      Severity: Major
      Found in openc3/lib/openc3/interfaces/tcpip_client_interface.rb - About 50 mins to fix

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

          def self.mdy2julian(year, month = 1, day = 1, hour = 0, minute = 0, second = 0, us = 0)
        Severity: Major
        Found in openc3/lib/openc3/core_ext/time.rb - About 50 mins to fix

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

            def self.mdy2ccsds(year, month, day, hour, minute, second, us)
          Severity: Major
          Found in openc3/lib/openc3/core_ext/time.rb - About 50 mins to fix

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

                  write_termination_characters,
                  read_termination_characters,
                  strip_read_termination = true,
                  discard_leading_bytes = 0,
                  sync_pattern = nil,
            Severity: Major
            Found in openc3/lib/openc3/interfaces/protocols/terminated_protocol.rb - About 50 mins to fix

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

                  def initialize(name, bit_offset, bit_size, data_type, endianness, array_size = nil, overflow = :ERROR)
              Severity: Major
              Found in openc3/lib/openc3/packets/structure_item.rb - About 50 mins to fix

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

                      min_id_size,
                      discard_leading_bytes = 0,
                      sync_pattern = nil,
                      telemetry = true,
                      fill_fields = false,
                Severity: Major
                Found in openc3/lib/openc3/interfaces/protocols/fixed_protocol.rb - About 50 mins to fix

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

                    def self.mdy2mjd(year, month = 1, day = 1, hour = 0, minute = 0, second = 0, us = 0)
                  Severity: Major
                  Found in openc3/lib/openc3/core_ext/time.rb - About 50 mins to fix

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

                        def define_item(name, bit_offset, bit_size, data_type, array_size = nil, endianness = @default_endianness, overflow = :ERROR)
                    Severity: Major
                    Found in openc3/lib/openc3/packets/structure.rb - About 50 mins to fix

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

                          def initialize(hostname, port = 1883, ssl = false, write_topic = nil, read_topic = nil, protocol_type = nil, *protocol_args)
                      Severity: Major
                      Found in openc3/lib/openc3/interfaces/mqtt_stream_interface.rb - About 50 mins to fix

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

                            def initialize(hostname, port = 80, protocol = 'http', write_timeout = 5, read_timeout = nil, connect_timeout = 5, include_request_in_response = false)
                        Severity: Major
                        Found in openc3/lib/openc3/interfaces/http_client_interface.rb - About 50 mins to fix

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

                                name,
                                bit_offset,
                                bit_size,
                                data_type,
                                endianness,
                          Severity: Major
                          Found in openc3/lib/openc3/tools/table_manager/table_item.rb - About 50 mins to fix

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

                                  remote_log_directory,
                                  logging_enabled = true,
                                  cycle_time = nil,
                                  cycle_size = 1_000_000_000,
                                  cycle_hour = nil,
                            Severity: Major
                            Found in openc3/lib/openc3/logs/log_writer.rb - About 50 mins to fix

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

                                    def self.write(value, bit_offset, bit_size, data_type, buffer, endianness, overflow)
                              Severity: Major
                              Found in openc3/lib/openc3/accessors/binary_accessor.rb - About 50 mins to fix

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

                                    def self.check_overflow(value, min_value, max_value, hex_max_value, bit_size, data_type, overflow)
                                Severity: Major
                                Found in openc3/lib/openc3/accessors/binary_accessor.rb - About 50 mins to fix

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

                                      def self.check_overflow_array(values, min_value, max_value, hex_max_value, bit_size, data_type, overflow)
                                  Severity: Major
                                  Found in openc3/lib/openc3/accessors/binary_accessor.rb - About 50 mins to fix

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

                                        scope,
                                        name,
                                        suite_runner = nil,
                                        disconnect = false,
                                        environment = nil,
                                    Severity: Major
                                    Found in openc3-cosmos-script-runner-api/app/models/script.rb - About 50 mins to fix

                                      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

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

                                          build_cmd(target_name, command_name, param_list) {
                                            if (command_name === undefined) {
                                              return this.exec('build_cmd', target_name)
                                            } else {
                                              return this._cmd('build_cmd', target_name, command_name, param_list)
                                        Severity: Major
                                        Found in openc3/templates/tool_svelte/src/services/openc3-api.js and 8 other locations - About 50 mins to fix
                                        openc3/templates/tool_svelte/src/services/openc3-api.js on lines 404..415
                                        openc3/templates/tool_svelte/src/services/openc3-api.js on lines 431..442
                                        openc3/templates/tool_svelte/src/services/openc3-api.js on lines 444..450
                                        openc3/templates/tool_svelte/src/services/openc3-api.js on lines 452..463
                                        openc3/templates/tool_svelte/src/services/openc3-api.js on lines 465..476
                                        openc3/templates/tool_svelte/src/services/openc3-api.js on lines 478..484
                                        openc3/templates/tool_svelte/src/services/openc3-api.js on lines 486..497
                                        openc3/templates/tool_svelte/src/services/openc3-api.js on lines 499..510

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

                                        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