rokumatsumoto/boyutluseyler

View on GitHub
lib/tasks/dev.rake

Summary

Maintainability
Test Coverage

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

  namespace :dev do
    desc 'Sample data for local development environment'
    task prime: :environment do
      Faker::UniqueGenerator.clear

Severity: Minor
Found in lib/tasks/dev.rake 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.

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

    task prime: :environment do
      Faker::UniqueGenerator.clear

      steps = 9

Severity: Minor
Found in lib/tasks/dev.rake 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.

Line is too long. [146/100]
Open

            url_path: "#{illustration_source}/id/#{illustration_id}/#{illustration_large_size}/#{illustration_large_size}.#{illustration_format}",
Severity: Minor
Found in lib/tasks/dev.rake by rubocop

Line is too long. [150/100]
Open

            medium_url: "#{illustration_source}/id/#{illustration_id}/#{illustration_medium_size}/#{illustration_medium_size}.#{illustration_format}",
Severity: Minor
Found in lib/tasks/dev.rake by rubocop

Line is too long. [155/100]
Open

            thumb_url: "#{blueprint_image_source}/id/#{blueprint_id}/#{blueprint_image_thumb_size}/#{blueprint_image_thumb_size}.#{blueprint_image_format}"
Severity: Minor
Found in lib/tasks/dev.rake by rubocop

Line is too long. [104/100]
Open

            "#{Faker::Construction.heavy_equipment} üzerinde #{Faker::Science.element} ile basılmıştır."
Severity: Minor
Found in lib/tasks/dev.rake by rubocop

Use (i % 5).zero? instead of i % 5 == 0.
Open

          model_file_format: i % 5 == 0 ? 'STL ve ZIP' : blueprint_extensions.sample,
Severity: Minor
Found in lib/tasks/dev.rake by rubocop

This cop checks for usage of comparison operators (==, >, <) to test numbers as zero, positive, or negative. These can be replaced by their respective predicate methods. The cop can also be configured to do the reverse.

The cop disregards #nonzero? as it its value is truthy or falsey, but not true and false, and thus not always interchangeable with != 0.

The cop ignores comparisons to global variables, since they are often populated with objects which can be compared with integers, but are not themselves Integer polymorphic.

Example: EnforcedStyle: predicate (default)

# bad

foo == 0
0 > foo
bar.baz > 0

# good

foo.zero?
foo.negative?
bar.baz.positive?

Example: EnforcedStyle: comparison

# bad

foo.zero?
foo.negative?
bar.baz.positive?

# good

foo == 0
0 > foo
bar.baz > 0

Useless assignment to variable - design.
Open

        design = Design.create!(
Severity: Minor
Found in lib/tasks/dev.rake by rubocop

This cop checks for every useless assignment to local variable in every scope. The basic idea for this cop was from the warning of ruby -cw:

assigned but unused variable - foo

Currently this cop has advanced logic that detects unreferenced reassignments and properly handles varied cases such as branch, loop, rescue, ensure, etc.

Example:

# bad

def some_method
  some_var = 1
  do_something
end

Example:

# good

def some_method
  some_var = 1
  do_something(some_var)
end

Line is too long. [146/100]
Open

            thumb_url: "#{illustration_source}/id/#{illustration_id}/#{illustration_thumb_size}/#{illustration_thumb_size}.#{illustration_format}"
Severity: Minor
Found in lib/tasks/dev.rake by rubocop

Line is too long. [103/100]
Open

            url: "#{Boyutluseyler.config[:direct_upload_endpoint]}/bowser_low_poly_flowalistik223.STL",
Severity: Minor
Found in lib/tasks/dev.rake by rubocop

Line is too long. [141/100]
Open

            url: "#{illustration_source}/id/#{illustration_id}/#{illustration_large_size}/#{illustration_large_size}.#{illustration_format}",
Severity: Minor
Found in lib/tasks/dev.rake by rubocop

Line is too long. [147/100]
Open

            large_url: "#{illustration_source}/id/#{illustration_id}/#{illustration_large_size}/#{illustration_large_size}.#{illustration_format}",
Severity: Minor
Found in lib/tasks/dev.rake by rubocop

Line is too long. [109/100]
Open

          description: Faker::Hipster.unique.paragraphs(number: rand(1..5)).map { |pr| "<p>#{pr}</p>" }.join,
Severity: Minor
Found in lib/tasks/dev.rake by rubocop

There are no issues that match your filters.

Category
Status