ManageIQ/manageiq-consumption

View on GitHub

Showing 22 of 22 total issues

Dependencies should be sorted in an alphabetical order within their section of the gemspec. Dependency hashdiff should appear before money-rails.
Open

  spec.add_dependency "hashdiff", "~> 1.0"
Severity: Minor
Found in manageiq-consumption.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'

Example: TreatCommentsAsGroupSeparators: true (default)

# good
# For code quality
spec.add_dependency 'rubocop'
# For tests
spec.add_dependency 'rspec'

Example: TreatCommentsAsGroupSeparators: false

# bad
# For code quality
spec.add_dependency 'rubocop'
# For tests
spec.add_dependency 'rspec'

Avoid more than 3 levels of block nesting.
Open

        for m in 0..METRICS.to_i do
          v.metrics << Metric.create(
              :capture_interval_name => "realtime",
              :resource_type         => "Vm",
              :timestamp                  => date_seed + m.hours + rand(0...2).days,
Severity: Minor
Found in docs/benchmarks/benchmark_events.rb by rubocop

Checks for excessive nesting of conditional and looping constructs.

You can configure if blocks are considered using the CountBlocks option. When set to false (the default) blocks are not counted towards the nesting level. Set to true to count blocks as well.

The maximum level of nesting allowed is configurable.

Severity
Category
Status
Source
Language