OpenC3/cosmos

View on GitHub

Showing 842 of 1,379 total issues

Method get_metrics has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    def get_metrics(manual: false, scope: $openc3_scope, token: $openc3_token)
      authorize(permission: 'system', manual: manual, scope: scope, token: token)

      sum_metrics = SUM_METRICS.dup
      duration_metrics = DURATION_METRICS.dup
Severity: Minor
Found in openc3/lib/openc3/api/metrics_api.rb - About 1 hr to fix

    Method create has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      def create(update = false)
        return unless authorization('admin')
        file = params[:plugin]
        if file
          scope = sanitize_params([:scope])
    Severity: Minor
    Found in openc3-cosmos-cmd-tlm-api/app/controllers/plugins_controller.rb - About 1 hr to fix

      Method debug has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        def debug(debug_text)
          handle_output_io()
          if not running?
            # Capture STDOUT and STDERR
            $stdout.add_stream(@output_io)
      Severity: Minor
      Found in openc3-cosmos-script-runner-api/app/models/running_script.rb - About 1 hr to fix

        Method remote_target_files has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            def self.remote_target_files(bucket_client:, prefix:, include_temp: false, path_matchers: nil)
              result = Set.new
              temp = Set.new
              resp = bucket_client.list_objects(
                bucket: ENV['OPENC3_CONFIG_BUCKET'],
        Severity: Minor
        Found in openc3/lib/openc3/utilities/target_file.rb - About 1 hr to fix

          Method generate_microservice has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              def self.generate_microservice(args)
                if args.length < 2 or args.length > 3
                  abort("Usage: cli generate #{args[0]} <NAME> (--ruby or --python)")
                end
          
          
          Severity: Minor
          Found in openc3/lib/openc3/utilities/cli_generator.rb - About 1 hr to fix

            Function _wait_packet has 8 arguments (exceeds 4 allowed). Consider refactoring.
            Open

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

              Function _openc3_script_wait has 8 arguments (exceeds 4 allowed). Consider refactoring.
              Open

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

                Consider simplifying this complex logical expression.
                Open

                      if (
                        lastEquality &&
                        ((pre_ins && pre_del && post_ins && post_del) ||
                          (lastEquality.length < this.Diff_EditCost / 2 &&
                            pre_ins + pre_del + post_ins + post_del == 3))

                  Function _openc3_script_wait_value has 8 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

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

                    Function _get_overrides has 8 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        def _get_overrides(cls, now, tgt_pkt_key, overrides, target_name, packet_name, cache_timeout, scope):
                    Severity: Major
                    Found in openc3/python/openc3/models/cvt_model.py - About 1 hr to fix

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

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

                        Function check_overflow has 8 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            def check_overflow(cls, value, min_value, max_value, hex_max_value, bit_size, data_type, overflow):
                        Severity: Major
                        Found in openc3/python/openc3/accessors/binary_accessor.py - About 1 hr to fix

                          Function _openc3_script_wait has 8 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

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

                            Function _wait_packet has 8 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

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

                              Function _openc3_script_wait_value has 8 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

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

                                Function check_overflow_array has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                    def check_overflow_array(cls, values, min_value, max_value, hex_max_value, bit_size, data_type, overflow):
                                Severity: Major
                                Found in openc3/python/openc3/accessors/binary_accessor.py - About 1 hr to fix

                                  Function write has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                      def write(cls, value, bit_offset, bit_size, data_type, buffer, endianness, overflow):
                                  Severity: Major
                                  Found in openc3/python/openc3/accessors/binary_accessor.py - About 1 hr to fix

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

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

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

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

                                        Method reduce_running has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                        Open

                                            def reduce_running(key, reduced, samples, samples_sum, avg_key, stddev_key, avgvals_key, stddevvals_key)
                                        Severity: Major
                                        Found in openc3/lib/openc3/microservices/reducer_microservice.rb - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language