mgleon08/rorr

View on GitHub

Showing 106 of 106 total issues

Unnecessary utf-8 encoding comment.
Open

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

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

  spec.authors       = ["Leon Ji"]
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

require "irb"
Severity: Minor
Found in bin/console 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. [113/80]
Open

      UI.puts "\nWhen you're done editing player.rb, type the #{'rorr'.green} to check, #{UI.skip}, #{UI.exit}\n"
Severity: Minor
Found in lib/rorr/test_pass.rb by rubocop

Missing top-level class documentation comment.
Open

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

Missing top-level class documentation comment.
Open

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

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

  spec.homepage      = "https://github.com/mgleon08/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.license       = "MIT"
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_development_dependency "rake", "~> 10.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"

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

  spec.add_development_dependency "rake", "~> 10.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"

Line is too long. [95/80]
Open

        puts "\n#{repo_rjust('Correct Rate:', 14)} #{repo_rjust(Score.correct_rate, 7)}%".green
Severity: Minor
Found in lib/rorr/ui.rb by rubocop

Do not use empty case condition, instead use an if expression.
Open

          case
Severity: Minor
Found in lib/rorr/return_value.rb by rubocop

This cop checks for case statements with an empty condition.

Example:

# bad:
case
when x == 0
  puts 'x is 0'
when y == 0
  puts 'y is 0'
else
  puts 'neither is 0'
end

# good:
if x == 0
  puts 'x is 0'
elsif y == 0
  puts 'y is 0'
else
  puts 'neither is 0'
end

# good: (the case condition node is not empty)
case n
when 0
  puts 'zero'
when 1
  puts 'one'
else
  puts 'more'
end

Line is too long. [147/80]
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

Line is too long. [99/80]
Open

  spec.files         = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|features)/}) }
Severity: Minor
Found in rorr.gemspec by rubocop

Use %q only for strings that contain both single quotes and double quotes.
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

Line is too long. [84/80]
Open

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

Line is too long. [160/80]
Open

          puts " #{repo_rjust(r[:question], 3)} |  #{repo_format(r[:correct], r[:color])}  |  #{repo_format(r[:skip], r[:color])}  |  #{repo_format(r[:retry])}"
Severity: Minor
Found in lib/rorr/ui.rb by rubocop

Ambiguous negative number operator. Parenthesize the method arguments if it's surely a negative number operator, or add a whitespace to the right of the - if it should be a subtraction.
Open

      options.on('-n', '--number NUMBER', 'Number of questions (default: 10, all = 0)') { |number| Config.number = (number.to_i -1) }
Severity: Minor
Found in lib/rorr/init.rb by rubocop

This cop checks for ambiguous operators in the first argument of a method invocation without parentheses.

Example:

# bad

# The `*` is interpreted as a splat operator but it could possibly be
# a `*` method invocation (i.e. `do_something.*(some_array)`).
do_something *some_array

Example:

# good

# With parentheses, there's no ambiguity.
do_something(*some_array)

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

require_relative "../lib/rorr"
Severity: Minor
Found in bin/rorr 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. [127/80]
Open

      options.on('-t', '--time SECONDS', 'Delay each turn by seconds (default: 0.6)') { |seconds| Config.delay = seconds.to_f }
Severity: Minor
Found in lib/rorr/init.rb by rubocop
Severity
Category
Status
Source
Language