lib/generamba/template/processor/template_declaration.rb
Prefer the use of the nil?
predicate. Open
Open
@type = TemplateDeclarationType::CATALOG_TEMPLATE if @git == nil && @local == nil
- Read upRead up
- Exclude checks
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
Open
end
- Exclude checks
Extra empty line detected at module body beginning. Open
Open
# This class acts as an Enumeration for TemplateDeclaration types
- Read upRead up
- Exclude checks
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
Open
@type = TemplateDeclarationType::CATALOG_TEMPLATE if @git == nil && @local == nil
- Read upRead up
- Exclude checks
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
Open
attr_reader :name, :local, :git, :branch, :type
- Read upRead up
- Exclude checks
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
Open
end
- Read upRead up
- Exclude checks
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
Open
# A local template - usually it's stored somewhere outside the current project directory
- Exclude checks
Line is too long. [87/80] Open
Open
@type = TemplateDeclarationType::CATALOG_TEMPLATE if @git == nil && @local == nil
- Exclude checks