lujanfernaud/prevy

View on GitHub

Showing 1,727 of 1,727 total issues

Inconsistent indentation detected.
Open

    def build_invitations
      quantity.times do
        @invitations << new_invitation
      end
    end

This cops checks for inconsistent indentation.

Example:

class A
  def test
    puts 'hello'
     puts 'world'
  end
end

Inconsistent indentation detected.
Open

    def remove_members_from_organizers
      group.members.each { |member| group.remove_from_organizers member }
    end

This cops checks for inconsistent indentation.

Example:

class A
  def test
    puts 'hello'
     puts 'world'
  end
end

Inconsistent indentation detected.
Open

    def prevy_bot
      @_prevy_bot ||= SampleUser.prevy_bot
    end

This cops checks for inconsistent indentation.

Example:

class A
  def test
    puts 'hello'
     puts 'world'
  end
end

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

      I18n.t("sample_event.website")

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"

Inconsistent indentation detected.
Open

    def body_without_leading_and_trailing_spaces
      parsed_body.gsub(LEADING_SPACES, "").gsub(TRAILING_SPACES, "")
    end

This cops checks for inconsistent indentation.

Example:

class A
  def test
    puts 'hello'
     puts 'world'
  end
end

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

      parsed_body.gsub(LEADING_SPACES, "").gsub(TRAILING_SPACES, "")

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"

Inconsistent indentation detected.
Open

    def regular_resource_without_image_updated?
      !resource.sample_resource? && !resource.saved_changes.include?("image")
    end

This cops checks for inconsistent indentation.

Example:

class A
  def test
    puts 'hello'
     puts 'world'
  end
end

Inconsistent indentation detected.
Open

    def event_title
      I18n.t("sample_event.title")
    end

This cops checks for inconsistent indentation.

Example:

class A
  def test
    puts 'hello'
     puts 'world'
  end
end

Inconsistent indentation detected.
Open

    def address_attributes
      {
        place_name: "Playa del Duque",
        street1:    "Costa Adeje",
        city:       "Adeje",

This cops checks for inconsistent indentation.

Example:

class A
  def test
    puts 'hello'
     puts 'world'
  end
end

Inconsistent indentation detected.
Open

    attr_reader :user, :group, :membership_request

This cops checks for inconsistent indentation.

Example:

class A
  def test
    puts 'hello'
     puts 'world'
  end
end

Inconsistent indentation detected.
Open

    def store_base64_image
      resource.create_image_placeholder! image_base64: image_base64
    end

This cops checks for inconsistent indentation.

Example:

class A
  def test
    puts 'hello'
     puts 'world'
  end
end

Line is too long. [81/80]
Open

        message: "New announcement in #{group.name}: #{announcement_topic.title}"

Favor modifier unless usage when having a single-line body. Another good alternative is the usage of control flow &&/||.
Open

    unless value =~ VALID_EMAIL_REGEX
Severity: Minor
Found in app/validators/email_validator.rb 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?

Missing top-level class documentation comment.
Open

class NotificationMailer < ApplicationMailer
Severity: Minor
Found in app/mailers/notification_mailer.rb by rubocop

This cop checks for missing top-level documentation of classes and modules. Classes with no body are exempt from the check and so are namespace modules - modules that have nothing in their bodies except classes, other modules, or constant definitions.

The documentation requirement is annulled if the class or module has a "#:nodoc:" comment next to it. Likewise, "#:nodoc: all" does the same for all its children.

Example:

# bad
class Person
  # ...
end

# good
# Description/Explanation of Person class
class Person
  # ...
end

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

  default from: "notifications@prevy.herokuapp.com"
Severity: Minor
Found in app/mailers/notification_mailer.rb 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"

Use warn instead of $stderr.puts to allow such output to be disabled.
Open

    $stderr.puts "Yarn executable was not detected in the system."
Severity: Minor
Found in bin/yarn by rubocop

This cop identifies places where $stderr.puts can be replaced by warn. The latter has the advantage of easily being disabled by, e.g. the -W0 interpreter flag, or setting $VERBOSE to nil.

Example:

# bad
$stderr.puts('hello')

# good
warn('hello')

!important should not be used
Open

  border-top-right-radius: $box-radius !important;

!important should not be used
Open

  color: transparent !important;

Prefer single quoted strings
Open

@import "abstracts/variables";

Prefer single quoted strings
Open

@import "layout/breadcrumbs";
Severity
Category
Status
Source
Language