rambler-digital-solutions/Generamba

View on GitHub

Showing 840 of 840 total issues

Tab detected.
Open

            return file_name, content

Line is too long. [165/80]
Open

      module_group_already_exists = XcodeprojHelper.module_with_group_path_already_exists(project, code_module.project_group_path, code_module.create_logical_groups)
Severity: Minor
Found in lib/generamba/cli/gen_command.rb by rubocop

Trailing whitespace detected.
Open

      

Final newline missing.
Open

end
Severity: Minor
Found in lib/generamba/cli/setup_command.rb by rubocop

Redundant return detected.
Open

            return Liquid::Template.parse(template_text)

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.

Align the parameters of a method call if they span more than one line.
Open

                                                                code_module.test_file_root,
Severity: Minor
Found in lib/generamba/module_generator.rb by rubocop

Here we check if the parameters on a multi-line method call or definition are aligned.

Example: EnforcedStyle: withfirstparameter (default)

# good

foo :bar,
    :baz

# bad

foo :bar,
  :baz

Example: EnforcedStyle: withfixedindentation

# good

foo :bar,
  :baz

# bad

foo :bar,
    :baz

Align the parameters of a method call if they span more than one line.
Open

                                                                                                                dir_path,
Severity: Minor
Found in lib/generamba/module_generator.rb by rubocop

Here we check if the parameters on a multi-line method call or definition are aligned.

Example: EnforcedStyle: withfirstparameter (default)

# good

foo :bar,
    :baz

# bad

foo :bar,
  :baz

Example: EnforcedStyle: withfixedindentation

# good

foo :bar,
  :baz

# bad

foo :bar,
    :baz

Align the parameters of a method call if they span more than one line.
Open

                                                                                                                file_name,
Severity: Minor
Found in lib/generamba/module_generator.rb by rubocop

Here we check if the parameters on a multi-line method call or definition are aligned.

Example: EnforcedStyle: withfirstparameter (default)

# good

foo :bar,
    :baz

# bad

foo :bar,
  :baz

Example: EnforcedStyle: withfixedindentation

# good

foo :bar,
  :baz

# bad

foo :bar,
    :baz

Extra empty line detected at class body beginning.
Open


        def generate_module(name, code_module, template)
Severity: Minor
Found in lib/generamba/module_generator.rb by rubocop

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

Use 2 (not 4) spaces for indentation.
Open

                FileUtils.mkdir_p code_module.project_file_root if code_module.project_file_root
Severity: Minor
Found in lib/generamba/module_generator.rb by rubocop

This cops checks for indentation that doesn't use the specified number of spaces.

See also the IndentationConsistency cop which is the companion to this one.

Example:

# bad
class A
 def test
  puts 'hello'
 end
end

# good
class A
  def test
    puts 'hello'
  end
end

Example: IgnoredPatterns: ['^\s*module']

# bad
module A
class B
  def test
  puts 'hello'
  end
end
end

# good
module A
class B
  def test
    puts 'hello'
  end
end
end

Tab detected.
Open

                puts('Creating code files...')
Severity: Minor
Found in lib/generamba/module_generator.rb by rubocop

Tab detected.
Open

                process_files_if_needed(template.code_files,
Severity: Minor
Found in lib/generamba/module_generator.rb by rubocop

Tab detected.
Open

                                                                code_module.project_group_path,
Severity: Minor
Found in lib/generamba/module_generator.rb by rubocop

Tab detected.
Open

            puts "Project group path: #{code_module.project_group_path}".green if code_module.project_group_path
Severity: Minor
Found in lib/generamba/module_generator.rb by rubocop

Tab detected.
Open

            # The same is for files property - a template can have only test or project files
Severity: Minor
Found in lib/generamba/module_generator.rb by rubocop

Tab detected.
Open

                module_info = ModuleInfoGenerator.new(code_module)
Severity: Minor
Found in lib/generamba/module_generator.rb by rubocop

Line is too long. [96/80]
Open

                FileUtils.mkdir_p code_module.project_file_path if code_module.project_file_path
Severity: Minor
Found in lib/generamba/module_generator.rb by rubocop

Line is too long. [133/80]
Open

        def process_files_if_needed(files, code_module, template, project, targets, group_path, dir_path, root_path, processed_groups = [])
Severity: Minor
Found in lib/generamba/module_generator.rb by rubocop

Line is too long. [139/80]
Open

            XcodeprojHelper.clear_group(project, targets, group_path, code_module.create_logical_groups) unless processed_groups.include? group_path
Severity: Minor
Found in lib/generamba/module_generator.rb by rubocop

Use nested module/class definitions instead of compact style.
Open

module Generamba::CLI

This cop checks the style of children definitions at classes and modules. Basically there are two different styles:

Example: EnforcedStyle: nested (default)

# good
# have each child on its own line
class Foo
  class Bar
  end
end

Example: EnforcedStyle: compact

# good
# combine definitions as much as possible
class Foo::Bar
end

The compact style is only forced for classes/modules with one child.

Severity
Category
Status
Source
Language