OpenC3/cosmos

View on GitHub

Showing 1,379 of 1,379 total issues

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

    def packet_define_item(self, item, format_string, read_conversion, write_conversion, id_value):
Severity: Minor
Found in openc3/python/openc3/packets/packet.py - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                            if instance.logging_enabled and instance.filename:  # Logging and file opened
                                # Cycle based on total time logging
                                if (
                                    instance.cycle_time
                                    and (utc_now - instance.start_time).total_seconds() > instance.cycle_time
    Severity: Major
    Found in openc3/python/openc3/logs/log_writer.py - About 45 mins to fix

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

          def info(self, message=None, scope=None, user=None, type=LOG, url=None, other=None):
      Severity: Minor
      Found in openc3/python/openc3/utilities/logger.py - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                if not value.isascii():
                                    value = "0x" + simple_formatted(value)
                                else:
                                    value = f"'{str(value)}'"
                            else:
        Severity: Major
        Found in openc3/python/openc3/packets/commands.py - About 45 mins to fix

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

              def debug(self, message=None, scope=None, user=None, type=LOG, url=None, other=None):
          Severity: Minor
          Found in openc3/python/openc3/utilities/logger.py - About 45 mins to fix

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

                def warn(self, message=None, scope=None, user=None, type=LOG, url=None, other=None):
            Severity: Minor
            Found in openc3/python/openc3/utilities/logger.py - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                      if len(indexes_to_clear) > 0:
                                          for index in indexes_to_clear:
                                              instance.cleanup_offsets[index] = None
                                              instance.cleanup_times[index] = None
                                          instance.cleanup_offsets = [x for x in instance.cleanup_offsets if x is not None]
              Severity: Major
              Found in openc3/python/openc3/logs/log_writer.py - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                            if metadata:
                                                item["metadata"] = self.head_object(bucket=bucket, key=aws_item["Key"])
                                            files.append(item)
                Severity: Major
                Found in openc3/python/openc3/utilities/aws_bucket.py - About 45 mins to fix

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

                      def check_bit_offset_and_size(cls, read_or_write, given_bit_offset, given_bit_size, data_type, buffer):
                  Severity: Minor
                  Found in openc3/python/openc3/accessors/binary_accessor.py - About 45 mins to fix

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

                    def map_target_to_interface(
                    Severity: Minor
                    Found in openc3/python/openc3/api/interface_api.py - About 45 mins to fix

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

                          def fatal(self, message=None, scope=None, user=None, type=LOG, url=None, other=None):
                      Severity: Minor
                      Found in openc3/python/openc3/utilities/logger.py - About 45 mins to fix

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

                            def build_log_data(self, log_level, message, user=None, type=None, url=None, other=None):
                        Severity: Minor
                        Found in openc3/python/openc3/utilities/logger.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/streams/tcpip_client_stream.py - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                            if String === value
                                              value = value.clone
                                            elsif Array === value
                                              value = Marshal.load(Marshal.dump(value))
                                            end
                            Severity: Major
                            Found in openc3/lib/openc3/packets/packet.rb - About 45 mins to fix

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

                                  def parse_loop(self, io, yield_non_keyword_lines, remove_quotes_arg, size, rx):
                              Severity: Minor
                              Found in openc3/python/openc3/config/config_parser.py - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                              if type == 'disconnect'
                                                if json_hash['reason'] == 'unauthorized'
                                                  raise "Unauthorized"
                                                end
                                              end
                                Severity: Major
                                Found in openc3/lib/openc3/script/web_socket_api.rb - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                      if input == "REJECTED":
                                                          raise RuntimeError("Critical Cmd Rejected")
                                                      return input
                                  Severity: Major
                                  Found in openc3-cosmos-script-runner-api/scripts/running_script.py - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                    break if @cancel_thread
                                    Severity: Major
                                    Found in openc3/lib/openc3/microservices/interface_microservice.rb - About 45 mins to fix

                                      Method prompt_for_critical_cmd has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                          def prompt_for_critical_cmd(uuid, _username, _target_name, _cmd_name, _cmd_params, cmd_string)
                                      Severity: Minor
                                      Found in openc3/lib/openc3/script/script.rb - About 45 mins to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                                        if String === value
                                                          value = value.clone
                                                        elsif Array === value
                                                          value = Marshal.load(Marshal.dump(value))
                                                        end
                                        Severity: Major
                                        Found in openc3/lib/openc3/packets/packet.rb - About 45 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language