crowbar/crowbar-hadoop

View on GitHub
Rakefile

Summary

Maintainability
Test Coverage

Block has too many lines. [40/25]
Open

  namespace :assets do
    def available_assets
      Pathname.glob(
        File.expand_path(
          "../crowbar_framework/public/assets/**/*",
Severity: Minor
Found in Rakefile by rubocop

This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

Avoid rescuing without specifying an error class.
Open

rescue
Severity: Minor
Found in Rakefile by rubocop

This cop checks for rescuing StandardError. There are two supported styles implicit and explicit. This cop will not register an offense if any error other than StandardError is specified.

Example: EnforcedStyle: implicit

# `implicit` will enforce using `rescue` instead of
# `rescue StandardError`.

# bad
begin
  foo
rescue StandardError
  bar
end

# good
begin
  foo
rescue
  bar
end

# good
begin
  foo
rescue OtherError
  bar
end

# good
begin
  foo
rescue StandardError, SecurityError
  bar
end

Example: EnforcedStyle: explicit (default)

# `explicit` will enforce using `rescue StandardError`
# instead of `rescue`.

# bad
begin
  foo
rescue
  bar
end

# good
begin
  foo
rescue StandardError
  bar
end

# good
begin
  foo
rescue OtherError
  bar
end

# good
begin
  foo
rescue StandardError, SecurityError
  bar
end

Favor modifier if usage when having a single-line body. Another good alternative is the usage of control flow &&/||. (https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier)
Open

        if simple.exist?
Severity: Minor
Found in Rakefile by rubocop

Checks for if and unless statements that would fit on one line if written as a modifier if/unless. The maximum line length is configured in the Metrics/LineLength cop.

Example:

# bad
if condition
  do_stuff(bar)
end

unless qux.empty?
  Foo.do_something
end

# good
do_stuff(bar) if condition
Foo.do_something unless qux.empty?

Line is too long. [104/100] (https://github.com/SUSE/style-guides/blob/master/Ruby.md#metricslinelength)
Open

    system("for f in `find -name \*.rb`; do echo -n \"Syntaxcheck $f: \"; ruby -c $f || exit $? ; done")
Severity: Minor
Found in Rakefile by rubocop

Do not suppress exceptions. (https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions)
Open

rescue
Severity: Minor
Found in Rakefile by rubocop

This cop checks for rescue blocks with no body.

Example:

# bad

def some_method
  do_something
rescue
  # do nothing
end

Example:

# bad

begin
  do_something
rescue
  # do nothing
end

Example:

# good

def some_method
  do_something
rescue
  handle_exception
end

Example:

# good

begin
  do_something
rescue
  handle_exception
end

Prefer $CHILD_STATUS from the stdlib 'English' module (don't forget to require it) over $?. (https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms)
Open

    exit $?.exitstatus
Severity: Minor
Found in Rakefile by rubocop

There are no issues that match your filters.

Category
Status