houston/houston-core

View on GitHub

Showing 1,937 of 1,937 total issues

Avoid rescuing the Exception class. Perhaps you meant to rescue StandardError?
Open

          rescue Exception # rescues StandardError by default; but we want to rescue and report all errors
            raise if raise_exceptions?

            $!.additional_information[:event] = event
            $!.additional_information[:async] = invoke_async?
Severity: Minor
Found in lib/houston/boot/observer.rb by rubocop

This cop checks for rescue blocks targeting the Exception class.

Example:

# bad

begin
  do_something
rescue Exception
  handle_exception
end

Example:

# good

begin
  do_something
rescue ArgumentError
  handle_exception
end

Prefer $ERROR_INFO from the stdlib 'English' module (don't forget to require it) over $!.
Open

            $!.additional_information[:async] = invoke_async?
Severity: Minor
Found in lib/houston/boot/observer.rb by rubocop

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

    arguments = t.name.split(":")[1..-1] # skip test:
Severity: Minor
Found in lib/tasks/specific_tests.rake 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 exceeds maximum allowed length
Open

  '<div class="timeline-date-gap"></div>' + Handlebars.helpers.timelineDate(date)

Line exceeds maximum allowed length
Open

      # single argument t and returns a number between the starting angle and the

Prefer $ERROR_INFO from the stdlib 'English' module (don't forget to require it) over $!.
Open

            Houston.report_exception($!)
Severity: Minor
Found in lib/houston/boot/observer.rb by rubocop

Trailing whitespace detected.
Open

# 
Severity: Minor
Found in lib/tasks/specific_tests.rake by rubocop

Trailing whitespace detected.
Open

# 
Severity: Minor
Found in lib/tasks/specific_tests.rake by rubocop

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

  gem "webmock", require: "webmock/minitest"
Severity: Minor
Found in Gemfile 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

  gem "minitest-reporters-turn_reporter", require: false
Severity: Minor
Found in Gemfile 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 exceeds maximum allowed length
Open

    return unless @$window.scrollTop() >= (@$document.height() - @$window.height() - @offset)

Line exceeds maximum allowed length
Open

    relativeRoot = relativeRoot.substring(0, relativeRoot.length - 1) if /\/$/.test(relativeRoot)

Line exceeds maximum allowed length
Open

    "<img src=\"#{gravatarUrl}\" class=\"avatar\" width=\"#{size}\" height=\"#{size}\" rel=\"tooltip\" title=\"#{title}\" />"

Line exceeds maximum allowed length
Open

        # Double the length because Opera is inconsistent about whether a carriage return is one character or two. Sigh.

Line exceeds maximum allowed length
Open

    # center of the canvas. This way, we don't need to position arcs individually.

Surrounding space missing in default value assignment.
Open

    def fire(event, params={})
Severity: Minor
Found in lib/houston/boot/observer.rb by rubocop

Checks that the equals signs in parameter default assignments have or don't have surrounding space depending on configuration.

Example:

# bad
def some_method(arg1=:default, arg2=nil, arg3=[])
  # do something...
end

# good
def some_method(arg1 = :default, arg2 = nil, arg3 = [])
  # do something...
end

Line is too long. [85/80]
Open

        raise ArgumentError, "params must be a Hash" unless params.respond_to?(:to_h)
Severity: Minor
Found in lib/houston/boot/observer.rb by rubocop

Extra empty line detected at class body end.
Open


  end
Severity: Minor
Found in lib/houston/boot/observer.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

Line is too long. [139/80]
Open

        raise UnregisteredParamError, "#{unregistered_params.first.inspect} is a not a registered param of the event #{event_name.inspect}"
Severity: Minor
Found in lib/houston/boot/observer.rb by rubocop

Extra blank line detected.
Open



Severity: Minor
Found in lib/houston/boot/observer.rb by rubocop

This cops checks for two or more consecutive blank lines.

Example:

# bad - It has two empty lines.
some_method
# one empty line
# two empty lines
some_method

# good
some_method
# one empty line
some_method
Severity
Category
Status
Source
Language