experteer/blobsterix

View on GitHub

Showing 26 of 43 total issues

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

    def do()

      with_tempfiles do |keys|
        last_key = "#{@input_data.path}"

Severity: Minor
Found in lib/blobsterix/transformation/transformation_chain.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 Hash64B has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

  def self.Hash64B(key)
    len = key.size
    seed = 11

    m = 0x5bd1e995 #1540483477
Severity: Minor
Found in lib/blobsterix/helper/murmur.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 delete has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

      def delete(bucket)
        begin
          logger.info "Storage: delete bucket #{contents(bucket)}"
          FileUtils.rm_rf(contents(bucket)) if bucket_exist(bucket) && bucket_empty?(bucket)
        rescue => e
Severity: Minor
Found in lib/blobsterix/storage/file_system.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 get has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

      def get(bucket, key)
        begin
          if (not File.directory?(contents(bucket, key))) # and bucket_files(bucket).include?(key)
            Blobsterix.storage_read(BlobAccess.new(:bucket => bucket, :id => key))
            metaData(bucket, key)
Severity: Minor
Found in lib/blobsterix/storage/file_system.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 magic_match_str has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

  def self.magic_match_str(str, matches)
    matches.any? do |offset, value, children|
      match =
        if Range === offset
          x = str[offset.begin, offset.end - offset.begin + value.bytesize]
Severity: Minor
Found in lib/blobsterix/mimemagic/magic.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 delete has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

      def delete
        File.delete(meta_path) if File.exists?(meta_path)
        # File.delete(path) if valid
        Pathname.new(path).ascend do |p|
          begin
Severity: Minor
Found in lib/blobsterix/storage/file_system_meta_data.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