rambler-digital-solutions/Generamba

View on GitHub

Showing 840 of 840 total issues

Trailing whitespace detected.
Open

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

Line is too long. [214/80]
Open

        puts('Rambafile successfully created!\n Go on and find some templates in our catalog using `generamba template list` command.\n Add any of them to the Rambafile and run `generamba template install`.'.green)
Severity: Minor
Found in lib/generamba/cli/setup_command.rb by rubocop

Add an empty line after magic comments.
Open

lib = File.expand_path('../lib', __FILE__)
Severity: Minor
Found in generamba.gemspec by rubocop

Checks for a newline after the final magic comment.

Example:

# good
# frozen_string_literal: true

# Some documentation for Person
class Person
  # Some code
end

# bad
# frozen_string_literal: true
# Some documentation for Person
class Person
  # Some code
end

Space missing after comma.
Open

        value_index = ask_with_validation(message,->(value){ (value.to_i >= 0 and value.to_i < array.count) },"Invalid selection. Please enter number from 0 to #{array.count-1}")
Severity: Minor
Found in lib/generamba/cli/thor_extension.rb by rubocop

Checks for comma (,) not followed by some kind of space.

Example:

# bad
[1,2]
{ foo:bar,}

# good
[1, 2]
{ foo:bar, }

Line is too long. [91/80]
Open

            test_group_path = ask('The default path for creating tests (in Xcode groups):')
Severity: Minor
Found in lib/generamba/cli/setup_command.rb by rubocop

Final newline missing.
Open

end

Surrounding space missing for operator -.
Open

        value_index = ask_with_validation(message,->(value){ (value.to_i >= 0 and value.to_i < array.count) },"Invalid selection. Please enter number from 0 to #{array.count-1}")
Severity: Minor
Found in lib/generamba/cli/thor_extension.rb by rubocop

Checks that operators have space around them, except for ** which should not have surrounding space.

Example:

# bad
total = 3*4
"apple"+"juice"
my_number = 38/4
a ** b

# good
total = 3 * 4
"apple" + "juice"
my_number = 38 / 4
a**b

Line is too long. [88/80]
Open

      def ask_non_empty_string(message, description = 'Value should be nonempty string')
Severity: Minor
Found in lib/generamba/cli/thor_extension.rb by rubocop

Line is too long. [178/80]
Open

        value_index = ask_with_validation(message,->(value){ (value.to_i >= 0 and value.to_i < array.count) },"Invalid selection. Please enter number from 0 to #{array.count-1}")
Severity: Minor
Found in lib/generamba/cli/thor_extension.rb by rubocop

Line is too long. [124/80]
Open

          is_right_path = yes?"The path to a #{message_file_name} is '#{project_files[0]}'. Do you want to use it? (yes/no)"
Severity: Minor
Found in lib/generamba/cli/thor_extension.rb by rubocop

Space missing after comma.
Open

        return ask_with_validation(message,->(value){value.length > 0 },description)
Severity: Minor
Found in lib/generamba/cli/thor_extension.rb by rubocop

Checks for comma (,) not followed by some kind of space.

Example:

# bad
[1,2]
{ foo:bar,}

# good
[1, 2]
{ foo:bar, }

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

  class ::Thor
Severity: Minor
Found in lib/generamba/cli/thor_extension.rb by rubocop

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.

Redundant return detected.
Open

        return array[value_index.to_i]
Severity: Minor
Found in lib/generamba/cli/thor_extension.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.

Unnecessary utf-8 encoding comment.
Open

# coding: utf-8
Severity: Minor
Found in generamba.gemspec by rubocop

Redundant return detected.
Open

      return preferences[USERNAME_KEY]

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 array
Severity: Minor
Found in lib/generamba/cli/thor_extension.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.

Dependencies should be sorted in an alphabetical order within their section of the gemspec. Dependency fakefs should appear before rspec.
Open

  spec.add_development_dependency 'fakefs', '~> 0.6.1'
Severity: Minor
Found in generamba.gemspec by rubocop

Dependencies in the gemspec should be alphabetically sorted.

Example:

# bad
spec.add_dependency 'rubocop'
spec.add_dependency 'rspec'

# good
spec.add_dependency 'rspec'
spec.add_dependency 'rubocop'

# good
spec.add_dependency 'rubocop'

spec.add_dependency 'rspec'

# bad
spec.add_development_dependency 'rubocop'
spec.add_development_dependency 'rspec'

# good
spec.add_development_dependency 'rspec'
spec.add_development_dependency 'rubocop'

# good
spec.add_development_dependency 'rubocop'

spec.add_development_dependency 'rspec'

# bad
spec.add_runtime_dependency 'rubocop'
spec.add_runtime_dependency 'rspec'

# good
spec.add_runtime_dependency 'rspec'
spec.add_runtime_dependency 'rubocop'

# good
spec.add_runtime_dependency 'rubocop'

spec.add_runtime_dependency 'rspec'

# good only if TreatCommentsAsGroupSeparators is true
# For code quality
spec.add_dependency 'rubocop'
# For tests
spec.add_dependency 'rspec'

Line is too long. [211/80]
Open

  spec.description   = 'Generamba is a powerful and easy-to-use Xcode code generator. It provides a project-based configuration, flexible templates system, the ability to generate code and tests simultaneously.'
Severity: Minor
Found in generamba.gemspec by rubocop

Final newline missing.
Open

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

Align .join with .new on line 31.
Open

                 .join(GENERAMBA_HOME_DIR)

This cop checks the indentation of the method name part in method calls that span more than one line.

Example: EnforcedStyle: aligned

# bad
while myvariable
.b
  # do something
end

# good
while myvariable
      .b
  # do something
end

# good
Thing.a
     .b
     .c

Example: EnforcedStyle: indented

# good
while myvariable
  .b

  # do something
end

Example: EnforcedStyle: indentedrelativeto_receiver

# good
while myvariable
        .a
        .b

  # do something
end

# good
myvariable = Thing
               .a
               .b
               .c
Severity
Category
Status
Source
Language