thekuwayama/tttls1.3

View on GitHub

Showing 84 of 95 total issues

Method send_new_client_hello has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def send_new_client_hello(ch1,
                              hrr,
                              extensions,
                              binder_key = nil,
                              ech_state = nil)
Severity: Minor
Found in lib/tttls1.3/client.rb - About 25 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method deserialize has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

        def self.deserialize(binary, msg_type)
          raise Error::ErrorAlerts, :internal_error if binary.nil?

          versions = []
          case msg_type
Severity: Minor
Found in lib/tttls1.3/message/extension/supported_versions.rb - About 25 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method deserialize has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def self.deserialize(binary)
      raise Error::ErrorAlerts, :internal_error if binary.nil?

      cipher_suites = []
      i = 0
Severity: Minor
Found in lib/tttls1.3/cipher_suites.rb - About 25 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method deserialize_host_name has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

          def deserialize_host_name(binary)
            raise Error::ErrorAlerts, :internal_error if binary.nil?

            return nil unless binary.length > 5 &&
                              binary[2] == NameType::HOST_NAME
Severity: Minor
Found in lib/tttls1.3/message/extension/server_name.rb - About 25 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Severity
Category
Status
Source
Language