crowbar/crowbar-hadoop

View on GitHub

Showing 509 of 509 total issues

1 trailing blank lines detected. (https://github.com/bbatsov/ruby-style-guide#newline-eof)
Open

Carriage return character detected. (https://github.com/bbatsov/ruby-style-guide#crlf)
Open

#
# Cookbook Name: pig

Gems should be sorted in an alphabetical order within their section of the Gemfile. Gem rspec should appear before sprockets.
Open

  gem "rspec", "~> 3.1.0"
Severity: Minor
Found in Gemfile by rubocop

Gems should be alphabetically sorted within groups.

Example:

# bad
gem 'rubocop'
gem 'rspec'

# good
gem 'rspec'
gem 'rubocop'

# good
gem 'rubocop'

gem 'rspec'

# good only if TreatCommentsAsGroupSeparators is true
# For code quality
gem 'rubocop'
# For tests
gem 'rspec'

Carriage return character detected. (https://github.com/bbatsov/ruby-style-guide#crlf)
Open

#
# Cookbook Name: hive

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

Use __dir__ to get an absolute path to the current file's directory.
Open

require File.join(File.expand_path(File.dirname(__FILE__)), "barclamp_lib")
Severity: Minor
Found in bin/crowbar_zookeeper by rubocop

This cop checks for places where the #__dir__ method can replace more complex constructs to retrieve a canonicalized absolute path to the current file.

Example:

# bad
path = File.expand_path(File.dirname(__FILE__))

# bad
path = File.dirname(File.realpath(__FILE__))

# good
path = __dir__

Avoid using {...} for multi-line blocks. (https://github.com/bbatsov/ruby-style-guide#single-line-blocks)
Open

    edge_nodes.each { |x|

Check for uses of braces or do/end around single line or multi-line blocks.

Example: EnforcedStyle: linecountbased (default)

# bad - single line block
items.each do |item| item / 5 end

# good - single line block
items.each { |item| item / 5 }

# bad - multi-line block
things.map { |thing|
  something = thing.some_method
  process(something)
}

# good - multi-line block
things.map do |thing|
  something = thing.some_method
  process(something)
end

Example: EnforcedStyle: semantic

# Prefer `do...end` over `{...}` for procedural blocks.

# return value is used/assigned
# bad
foo = map do |x|
  x
end
puts (map do |x|
  x
end)

# return value is not used out of scope
# good
map do |x|
  x
end

# Prefer `{...}` over `do...end` for functional blocks.

# return value is not used out of scope
# bad
each { |x|
  x
}

# return value is used/assigned
# good
foo = map { |x|
  x
}
map { |x|
  x
}.inspect

Example: EnforcedStyle: bracesforchaining

# bad
words.each do |word|
  word.flip.flop
end.join("-")

# good
words.each { |word|
  word.flip.flop
}.join("-")

Use self-assignment shorthand +=. (https://github.com/bbatsov/ruby-style-guide#self-assignment)
Open

        node_cnt = node_cnt +1

This cop enforces the use the shorthand for self-assignment.

Example:

# bad
x = x + 1

# good
x += 1

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

        headers["Content-Disposition"] = "attachment; filename=\"#{I18n.t('nodes.dell.nodes.filename', default: 'hadoop_infrastructure_inventory.txt')}\""
Severity
Category
Status
Source
Language