NullVoxPopuli/spiced_rumby

View on GitHub

Showing 64 of 64 total issues

(...) interpreted as grouped expression. (https://github.com/bbatsov/ruby-style-guide#parens-no-spaces)
Open

        print (name + ' ').colorize(:cyan)

Checks for space between the name of a called method and a left parenthesis.

Example:

# bad

puts (x + y)

Example:

# good

puts(x + y)

(...) interpreted as grouped expression. (https://github.com/bbatsov/ruby-style-guide#parens-no-spaces)
Open

        print (name + ' ').colorize(:light_black)

Checks for space between the name of a called method and a left parenthesis.

Example:

# bad

puts (x + y)

Example:

# good

puts(x + y)

Freeze mutable objects assigned to constants.
Open

      SUCCESS = '#00ff00'
Severity: Minor
Found in lib/spiced_rumby/gui/colorer.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

Missing space after #. (https://github.com/bbatsov/ruby-style-guide#hash-space)
Open

        background '#ff0000' #Colorer::BACKGROUND
Severity: Minor
Found in lib/spiced_rumby/gui/application.rb by rubocop

This cop checks whether comments have a leading space after the # denoting the start of the comment. The leading space is not required for some RDoc special syntax, like #++, #--, #:nodoc, =begin- and =end comments, "shebang" directives, or rackup options.

Example:

# bad
#Some comment

# good
# Some comment

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

  s.add_development_dependency 'pry-byebug'
Severity: Minor
Found in spiced_rumby.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'

Put a space before an end-of-line comment.
Open

            text msg#, mode: :wrap
Severity: Minor
Found in lib/spiced_rumby/gui/colorer.rb by rubocop

This cop checks for missing space between a token and a comment on the same line.

Example:

# bad
1 + 1# this operation does ...

# good
1 + 1 # this operation does ...

Freeze mutable objects assigned to constants.
Open

      WHISPER_CHAT = '#777777'
Severity: Minor
Found in lib/spiced_rumby/gui/colorer.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

Freeze mutable objects assigned to constants.
Open

  VERSION = '0.7.0'
Severity: Minor
Found in lib/spiced_rumby/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

Missing space after #. (https://github.com/bbatsov/ruby-style-guide#hash-space)
Open

            text msg#, mode: :wrap
Severity: Minor
Found in lib/spiced_rumby/gui/colorer.rb by rubocop

This cop checks whether comments have a leading space after the # denoting the start of the comment. The leading space is not required for some RDoc special syntax, like #++, #--, #:nodoc, =begin- and =end comments, "shebang" directives, or rackup options.

Example:

# bad
#Some comment

# good
# Some comment

Put a space before an end-of-line comment.
Open

            text msg#, mode: :wrap
Severity: Minor
Found in lib/spiced_rumby/gui/colorer.rb by rubocop

This cop checks for missing space between a token and a comment on the same line.

Example:

# bad
1 + 1# this operation does ...

# good
1 + 1 # this operation does ...

Freeze mutable objects assigned to constants.
Open

      NAME = '#007777'
Severity: Minor
Found in lib/spiced_rumby/gui/colorer.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

Unnecessary utf-8 encoding comment. (https://github.com/bbatsov/ruby-style-guide#utf-8)
Open

# -*- encoding: utf-8 -*-
Severity: Minor
Found in spiced_rumby.gemspec by rubocop

Put a space before an end-of-line comment.
Open

            text msg#, mode: :wrap
Severity: Minor
Found in lib/spiced_rumby/gui/colorer.rb by rubocop

This cop checks for missing space between a token and a comment on the same line.

Example:

# bad
1 + 1# this operation does ...

# good
1 + 1 # this operation does ...

Put a space before an end-of-line comment.
Open

            text msg#, mode: :wrap
Severity: Minor
Found in lib/spiced_rumby/gui/colorer.rb by rubocop

This cop checks for missing space between a token and a comment on the same line.

Example:

# bad
1 + 1# this operation does ...

# good
1 + 1 # this operation does ...

Prefer to_s over string interpolation.
Open

          aliases = MeshChat::Node.all.map { |n| "#{n.alias_name}" }
Severity: Minor
Found in lib/spiced_rumby/debug/cli_input.rb by rubocop

This cop checks for strings that are just an interpolated expression.

Example:

# bad
"#{@var}"

# good
@var.to_s

# good if @var is already a String
@var

Put a space before an end-of-line comment.
Open

            text msg#, mode: :wrap
Severity: Minor
Found in lib/spiced_rumby/gui/colorer.rb by rubocop

This cop checks for missing space between a token and a comment on the same line.

Example:

# bad
1 + 1# this operation does ...

# good
1 + 1 # this operation does ...

Freeze mutable objects assigned to constants.
Open

      SELECTED_CONTACT_BACKGROUND = '#333333'
Severity: Minor
Found in lib/spiced_rumby/gui/colorer.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

Do not prefix reader method names with get_. (https://github.com/bbatsov/ruby-style-guide#accessor_mutator_method_names)
Open

      def get_input
Severity: Minor
Found in lib/spiced_rumby/gui/input_hook.rb by rubocop

This cop makes sure that accessor methods are named properly.

Example:

# bad
def set_attribute(value)
end

# good
def attribute=(value)
end

# bad
def get_attribute
end

# good
def attribute
end

Freeze mutable objects assigned to constants.
Open

      TIME = '#CC66FF'
Severity: Minor
Found in lib/spiced_rumby/gui/colorer.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

Freeze mutable objects assigned to constants.
Open

      INFO = '#999999'
Severity: Minor
Found in lib/spiced_rumby/gui/colorer.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
Severity
Category
Status
Source
Language