OpenC3/cosmos

View on GitHub
openc3/lib/openc3/io/buffered_file.rb

Summary

Maintainability
A
2 hrs
Test Coverage

Method read has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

      def read(read_length)
        if read_length <= (@buffer.length - @buffer_index)
          # Return part of the buffer without having to go to the OS
          result = @buffer[@buffer_index, read_length]
          @buffer_index += read_length
Severity: Minor
Found in openc3/lib/openc3/io/buffered_file.rb - About 1 hr to fix

    Avoid too many return statements within this method.
    Open

                return @buffer.slice!(0..-1)
    Severity: Major
    Found in openc3/lib/openc3/io/buffered_file.rb - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                  return result
      Severity: Major
      Found in openc3/lib/openc3/io/buffered_file.rb - About 30 mins to fix

        There are no issues that match your filters.

        Category
        Status