rambler-digital-solutions/Generamba

View on GitHub
lib/generamba/template/processor/template_declaration.rb

Summary

Maintainability
A
0 mins
Test Coverage

Prefer the use of the nil? predicate.
Open

      @type = TemplateDeclarationType::CATALOG_TEMPLATE if @git == nil && @local == nil

This cop checks for comparison of something with nil using ==.

Example:

# bad
if x == nil
end

# good
if x.nil?
end

Final newline missing.
Open

end

Extra empty line detected at module body beginning.
Open


  # This class acts as an Enumeration for TemplateDeclaration types

This cops checks if empty lines around the bodies of modules match the configuration.

Example: EnforcedStyle: empty_lines

# good

module Foo

  def bar
    # ...
  end

end

Example: EnforcedStyle: emptylinesexcept_namespace

# good

module Foo
  module Bar

    # ...

  end
end

Example: EnforcedStyle: emptylinesspecial

# good
module Foo

  def bar; end

end

Example: EnforcedStyle: noemptylines (default)

# good

module Foo
  def bar
    # ...
  end
end

Prefer the use of the nil? predicate.
Open

      @type = TemplateDeclarationType::CATALOG_TEMPLATE if @git == nil && @local == nil

This cop checks for comparison of something with nil using ==.

Example:

# bad
if x == nil
end

# good
if x.nil?
end

Extra empty line detected at class body beginning.
Open


    attr_reader :name, :local, :git, :branch, :type

This cops checks if empty lines around the bodies of classes match the configuration.

Example: EnforcedStyle: empty_lines

# good

class Foo

  def bar
    # ...
  end

end

Example: EnforcedStyle: emptylinesexcept_namespace

# good

class Foo
  class Bar

    # ...

  end
end

Example: EnforcedStyle: emptylinesspecial

# good
class Foo

  def bar; end

end

Example: EnforcedStyle: noemptylines (default)

# good

class Foo
  def bar
    # ...
  end
end

Extra empty line detected at class body end.
Open


  end

This cops checks if empty lines around the bodies of classes match the configuration.

Example: EnforcedStyle: empty_lines

# good

class Foo

  def bar
    # ...
  end

end

Example: EnforcedStyle: emptylinesexcept_namespace

# good

class Foo
  class Bar

    # ...

  end
end

Example: EnforcedStyle: emptylinesspecial

# good
class Foo

  def bar; end

end

Example: EnforcedStyle: noemptylines (default)

# good

class Foo
  def bar
    # ...
  end
end

Line is too long. [92/80]
Open

    # A local template - usually it's stored somewhere outside the current project directory

Line is too long. [87/80]
Open

      @type = TemplateDeclarationType::CATALOG_TEMPLATE if @git == nil && @local == nil

There are no issues that match your filters.

Category
Status