mgleon08/rorr

View on GitHub

Showing 106 of 106 total issues

Do not use semicolons to terminate expressions.
Open

      options.on('-h', '--help', 'Show this message') { puts(options); exit }
Severity: Minor
Found in lib/rorr/init.rb by rubocop

This cop checks for multiple expressions placed on the same line. It also checks for lines terminated with a semicolon.

Example:

# bad
foo = 1; bar = 2;
baz = 3;

# good
foo = 1
bar = 2
baz = 3

Missing top-level class documentation comment.
Open

  class Init
Severity: Minor
Found in lib/rorr/init.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

Line is too long. [87/80]
Open

        @single = { question: "#{index}.", correct: '', skip: '', retry: 0, color: '' }
Severity: Minor
Found in lib/rorr/score.rb by rubocop

The use of eval is a serious security risk.
Open

      eval(stdin) == answer
Severity: Minor
Found in lib/rorr/return_value.rb by rubocop

This cop checks for the use of Kernel#eval and Binding#eval.

Example:

# bad

eval(something)
binding.eval(something)

%q-literals should be delimited by ( and ).
Open

  spec.summary       = %q{The easiest way to evaluate the Ruby or Rails proficiency in a interactive way.}
Severity: Minor
Found in rorr.gemspec by rubocop

This cop enforces the consistent usage of %-literal delimiters.

Specify the 'default' key to set all preferred delimiters at once. You can continue to specify individual preferred delimiters to override the default.

Example:

# Style/PercentLiteralDelimiters:
#   PreferredDelimiters:
#     default: '[]'
#     '%i':    '()'

# good
%w[alpha beta] + %i(gamma delta)

# bad
%W(alpha #{beta})

# bad
%I(alpha beta)

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

  spec.add_runtime_dependency "colorize", "~> 0.8.1"
Severity: Minor
Found in rorr.gemspec by rubocop

Checks if uses of quotes match the configured preference.

Example: EnforcedStyle: single_quotes (default)

# bad
"No special symbols"
"No string interpolation"
"Just text"

# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"

Example: EnforcedStyle: double_quotes

# bad
'Just some text'
'No special chars or interpolation'

# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"

Use %q only for strings that contain both single quotes and double quotes.
Open

  spec.summary       = %q{The easiest way to evaluate the Ruby or Rails proficiency in a interactive way.}
Severity: Minor
Found in rorr.gemspec by rubocop

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

require "bundler/gem_tasks"
Severity: Minor
Found in Rakefile by rubocop

Checks if uses of quotes match the configured preference.

Example: EnforcedStyle: single_quotes (default)

# bad
"No special symbols"
"No string interpolation"
"Just text"

# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"

Example: EnforcedStyle: double_quotes

# bad
'Just some text'
'No special chars or interpolation'

# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"

Line is too long. [99/80]
Open

      Dir[File.expand_path("../../../topic/methods/#{Config.level}/*.rb", __FILE__)].each do |file|
Severity: Minor
Found in lib/rorr/test_pass.rb by rubocop

Line is too long. [90/80]
Open

        puts_with_delay "\nsolution:\n".light_magenta + sol.to_s if sol && Config.solution
Severity: Minor
Found in lib/rorr/ui.rb by rubocop

Missing top-level class documentation comment.
Open

  class ReturnValue
Severity: Minor
Found in lib/rorr/return_value.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

%q-literals should be delimited by ( and ).
Open

  spec.description   = %q{This is a test designed to evaluate the Ruby or Rails proficiency and artificial intelligence in a fun, interactive way.}
Severity: Minor
Found in rorr.gemspec by rubocop

This cop enforces the consistent usage of %-literal delimiters.

Specify the 'default' key to set all preferred delimiters at once. You can continue to specify individual preferred delimiters to override the default.

Example:

# Style/PercentLiteralDelimiters:
#   PreferredDelimiters:
#     default: '[]'
#     '%i':    '()'

# good
%w[alpha beta] + %i(gamma delta)

# bad
%W(alpha #{beta})

# bad
%I(alpha beta)

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

  spec.add_runtime_dependency "colorize", "~> 0.8.1"
Severity: Minor
Found in rorr.gemspec by rubocop

Checks if uses of quotes match the configured preference.

Example: EnforcedStyle: single_quotes (default)

# bad
"No special symbols"
"No string interpolation"
"Just text"

# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"

Example: EnforcedStyle: double_quotes

# bad
'Just some text'
'No special chars or interpolation'

# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

        puts "3. Make all test pass"
Severity: Minor
Found in lib/rorr/ui.rb by rubocop

Checks if uses of quotes match the configured preference.

Example: EnforcedStyle: single_quotes (default)

# bad
"No special symbols"
"No string interpolation"
"Just text"

# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"

Example: EnforcedStyle: double_quotes

# bad
'Just some text'
'No special chars or interpolation'

# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"

Line is too long. [106/80]
Open

  spec.summary       = %q{The easiest way to evaluate the Ruby or Rails proficiency in a interactive way.}
Severity: Minor
Found in rorr.gemspec by rubocop

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

  spec.bindir        = "bin"
Severity: Minor
Found in rorr.gemspec by rubocop

Checks if uses of quotes match the configured preference.

Example: EnforcedStyle: single_quotes (default)

# bad
"No special symbols"
"No string interpolation"
"Just text"

# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"

Example: EnforcedStyle: double_quotes

# bad
'Just some text'
'No special chars or interpolation'

# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

  spec.executables   = ["rorr"]
Severity: Minor
Found in rorr.gemspec by rubocop

Checks if uses of quotes match the configured preference.

Example: EnforcedStyle: single_quotes (default)

# bad
"No special symbols"
"No string interpolation"
"Just text"

# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"

Example: EnforcedStyle: double_quotes

# bad
'Just some text'
'No special chars or interpolation'

# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

  spec.add_runtime_dependency "rspec", "~> 3.0"
Severity: Minor
Found in rorr.gemspec by rubocop

Checks if uses of quotes match the configured preference.

Example: EnforcedStyle: single_quotes (default)

# bad
"No special symbols"
"No string interpolation"
"Just text"

# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"

Example: EnforcedStyle: double_quotes

# bad
'Just some text'
'No special chars or interpolation'

# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"

Freeze mutable objects assigned to constants.
Open

  VERSION = "0.1.3"
Severity: Minor
Found in lib/rorr/version.rb by rubocop

This cop checks whether some constant value isn't a mutable literal (e.g. array or hash).

Example:

# bad
CONST = [1, 2, 3]

# good
CONST = [1, 2, 3].freeze

Line is too long. [92/80]
Open

        puts "#{repo_rjust('Skip Rate:', 14)} #{repo_rjust(Score.skip_rate, 7)}%".light_blue
Severity: Minor
Found in lib/rorr/ui.rb by rubocop
Severity
Category
Status
Source
Language