forward3d/rbhive

View on GitHub

Showing 65 of 414 total issues

Avoid too many return statements within this method.
Open

        return :error
Severity: Major
Found in lib/rbhive/t_c_l_i_connection.rb - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

            return :state_not_in_protocol
    Severity: Major
    Found in lib/rbhive/t_c_l_i_connection.rb - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

              return :pending
      Severity: Major
      Found in lib/rbhive/t_c_l_i_connection.rb - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                return :unknown
        Severity: Major
        Found in lib/rbhive/t_c_l_i_connection.rb - About 30 mins to fix

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

              def recv_drop_type()
                result = receive_message(Drop_type_result)
                return result.success unless result.success.nil?
                raise result.o1 unless result.o1.nil?
                raise result.o2 unless result.o2.nil?
          Severity: Minor
          Found in lib/thrift/thrift_hive_metastore.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 validate has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

              def validate
                unless @principal_type.nil? || ::PrincipalType::VALID_VALUES.include?(@principal_type)
                  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field principal_type!')
                end
                unless @grantorType.nil? || ::PrincipalType::VALID_VALUES.include?(@grantorType)
          Severity: Minor
          Found in lib/thrift/thrift_hive_metastore.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 recv_get_table has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

              def recv_get_table()
                result = receive_message(Get_table_result)
                return result.success unless result.success.nil?
                raise result.o1 unless result.o1.nil?
                raise result.o2 unless result.o2.nil?
          Severity: Minor
          Found in lib/thrift/thrift_hive_metastore.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 recv_get_partitions_by_filter has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

              def recv_get_partitions_by_filter()
                result = receive_message(Get_partitions_by_filter_result)
                return result.success unless result.success.nil?
                raise result.o1 unless result.o1.nil?
                raise result.o2 unless result.o2.nil?
          Severity: Minor
          Found in lib/thrift/thrift_hive_metastore.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 validate has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

                def validate
                  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field sessionHandle is unset!') unless @sessionHandle
                  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field owner is unset!') unless @owner
                  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field renewer is unset!') unless @renewer
                end
          Severity: Minor
          Found in lib/thrift/t_c_l_i_service_types.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 recv_create_database has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

              def recv_create_database()
                result = receive_message(Create_database_result)
                raise result.o1 unless result.o1.nil?
                raise result.o2 unless result.o2.nil?
                raise result.o3 unless result.o3.nil?
          Severity: Minor
          Found in lib/thrift/thrift_hive_metastore.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 recv_get_partition_with_auth has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

              def recv_get_partition_with_auth()
                result = receive_message(Get_partition_with_auth_result)
                return result.success unless result.success.nil?
                raise result.o1 unless result.o1.nil?
                raise result.o2 unless result.o2.nil?
          Severity: Minor
          Found in lib/thrift/thrift_hive_metastore.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 recv_get_partition_by_name has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

              def recv_get_partition_by_name()
                result = receive_message(Get_partition_by_name_result)
                return result.success unless result.success.nil?
                raise result.o1 unless result.o1.nil?
                raise result.o2 unless result.o2.nil?
          Severity: Minor
          Found in lib/thrift/thrift_hive_metastore.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 recv_get_partitions has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

              def recv_get_partitions()
                result = receive_message(Get_partitions_result)
                return result.success unless result.success.nil?
                raise result.o1 unless result.o1.nil?
                raise result.o2 unless result.o2.nil?
          Severity: Minor
          Found in lib/thrift/thrift_hive_metastore.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 recv_get_partitions_with_auth has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

              def recv_get_partitions_with_auth()
                result = receive_message(Get_partitions_with_auth_result)
                return result.success unless result.success.nil?
                raise result.o1 unless result.o1.nil?
                raise result.o2 unless result.o2.nil?
          Severity: Minor
          Found in lib/thrift/thrift_hive_metastore.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 recv_drop_index_by_name has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

              def recv_drop_index_by_name()
                result = receive_message(Drop_index_by_name_result)
                return result.success unless result.success.nil?
                raise result.o1 unless result.o1.nil?
                raise result.o2 unless result.o2.nil?
          Severity: Minor
          Found in lib/thrift/thrift_hive_metastore.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 recv_get_index_by_name has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

              def recv_get_index_by_name()
                result = receive_message(Get_index_by_name_result)
                return result.success unless result.success.nil?
                raise result.o1 unless result.o1.nil?
                raise result.o2 unless result.o2.nil?
          Severity: Minor
          Found in lib/thrift/thrift_hive_metastore.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 recv_get_database has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

              def recv_get_database()
                result = receive_message(Get_database_result)
                return result.success unless result.success.nil?
                raise result.o1 unless result.o1.nil?
                raise result.o2 unless result.o2.nil?
          Severity: Minor
          Found in lib/thrift/thrift_hive_metastore.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 recv_get_partition has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

              def recv_get_partition()
                result = receive_message(Get_partition_result)
                return result.success unless result.success.nil?
                raise result.o1 unless result.o1.nil?
                raise result.o2 unless result.o2.nil?
          Severity: Minor
          Found in lib/thrift/thrift_hive_metastore.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 recv_get_partitions_ps_with_auth has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

              def recv_get_partitions_ps_with_auth()
                result = receive_message(Get_partitions_ps_with_auth_result)
                return result.success unless result.success.nil?
                raise result.o1 unless result.o1.nil?
                raise result.o2 unless result.o2.nil?
          Severity: Minor
          Found in lib/thrift/thrift_hive_metastore.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 recv_drop_partition has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

              def recv_drop_partition()
                result = receive_message(Drop_partition_result)
                return result.success unless result.success.nil?
                raise result.o1 unless result.o1.nil?
                raise result.o2 unless result.o2.nil?
          Severity: Minor
          Found in lib/thrift/thrift_hive_metastore.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