grokify/mime-builder-ruby

View on GitHub
lib/mime_builder/json.rb

Summary

Maintainability
A
0 mins
Test Coverage

Line is too long. [84/80]
Open

      json_part.headers.set('Content-Transfer-Encoding', 'base64') if encode_base64?
Severity: Minor
Found in lib/mime_builder/json.rb by rubocop

Redundant return detected.
Open

      return BASE64_DEFAULT
Severity: Minor
Found in lib/mime_builder/json.rb by rubocop

This cop checks for redundant return expressions.

Example:

def test
  return something
end

def test
  one
  two
  three
  return something
end

It should be extended to handle methods whose body is if/else or a case expression with a default branch.

Redundant return detected.
Open

      return !CONTENTID_DEFAULT
Severity: Minor
Found in lib/mime_builder/json.rb by rubocop

This cop checks for redundant return expressions.

Example:

def test
  return something
end

def test
  one
  two
  three
  return something
end

It should be extended to handle methods whose body is if/else or a case expression with a default branch.

Line is too long. [88/80]
Open

      content = MultiJson.encode(content) if content.is_a?(Array) || content.is_a?(Hash)
Severity: Minor
Found in lib/mime_builder/json.rb by rubocop

Redundant return detected.
Open

      return json_part
Severity: Minor
Found in lib/mime_builder/json.rb by rubocop

This cop checks for redundant return expressions.

Example:

def test
  return something
end

def test
  one
  two
  three
  return something
end

It should be extended to handle methods whose body is if/else or a case expression with a default branch.

Missing top-level class documentation comment.
Open

  class JSON
Severity: Minor
Found in lib/mime_builder/json.rb by rubocop

This cop checks for missing top-level documentation of classes and modules. Classes with no body are exempt from the check and so are namespace modules - modules that have nothing in their bodies except classes, other modules, or constant definitions.

The documentation requirement is annulled if the class or module has a "#:nodoc:" comment next to it. Likewise, "#:nodoc: all" does the same for all its children.

Example:

# bad
class Person
  # ...
end

# good
# Description/Explanation of Person class
class Person
  # ...
end

There are no issues that match your filters.

Category
Status