OpenC3/cosmos

View on GitHub
openc3/python/openc3/accessors/binary_accessor.py

Summary

Maintainability
C
1 day
Test Coverage

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 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 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 read_array has 7 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def read_array(cls, bit_offset, bit_size, data_type, array_size, buffer, endianness):
          Severity: Major
          Found in openc3/python/openc3/accessors/binary_accessor.py - About 50 mins to fix

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

                def read(cls, bit_offset, bit_size, data_type, buffer, endianness):
            Severity: Minor
            Found in openc3/python/openc3/accessors/binary_accessor.py - About 45 mins to fix

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

                  def check_bounds_and_buffer_size(cls, bit_offset, bit_size, buffer_length, endianness, data_type):
              Severity: Minor
              Found in openc3/python/openc3/accessors/binary_accessor.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

                  Consider simplifying this complex logical expression.
                  Open

                              if not (
                                  (endianness == "LITTLE_ENDIAN")
                                  and ((data_type == "INT") or (data_type == "UINT"))
                                  and (
                                      # Not byte aligned with an even bit size
                  Severity: Major
                  Found in openc3/python/openc3/accessors/binary_accessor.py - About 40 mins to fix

                    Function raise_buffer_error has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

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

                      There are no issues that match your filters.

                      Category
                      Status