hpi-swt2/workshop-portal

View on GitHub

Showing 494 of 494 total issues

Use of !important
Open

    padding-right: 0 !important;

Don't use IDs in selectors.
Open

#event-date-pickers div {
Severity: Minor
Found in app/assets/stylesheets/events.css by csslint

Inconsistent indentation detected.
Open

    def wrong_filetype?(file)
      file.content_type != ALLOWED_MIMETYPE
    end
Severity: Minor
Found in app/models/agreement_letter.rb by rubocop

This cops checks for inconsistent indentation.

Example:

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

Inconsistent indentation detected.
Open

    @participants.sort { |x, y| self.compare_participants_by_agreement(x,y) }
Severity: Minor
Found in app/models/event.rb by rubocop

This cops checks for inconsistent indentation.

Example:

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

Line is too long. [100/80]
Open

  # @return [String] Concatenation of all email addresses of accepted applications, seperated by ','
Severity: Minor
Found in app/models/event.rb by rubocop

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

  scope :draft_is, ->(draft) { where("draft = ?", draft) }
Severity: Minor
Found in app/models/event.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 %i or %I for an array of symbols.
Open

      can [:index, :show, :edit, :update, :destroy], ApplicationLetter, user: { id: user.id }
Severity: Minor
Found in app/models/ability.rb by rubocop

This cop can check for array literals made up of symbols that are not using the %i() syntax.

Alternatively, it checks for symbol arrays using the %i() syntax on projects which do not want to use that syntax.

Configuration option: MinSize If set, arrays with fewer elements than this value will not trigger the cop. For example, a MinSize of3` will not enforce a style on an array of 2 or fewer elements.

Example: EnforcedStyle: percent (default)

# good
%i[foo bar baz]

# bad
[:foo, :bar, :baz]

Example: EnforcedStyle: brackets

# good
[:foo, :bar, :baz]

# bad
%i[foo bar baz]

Rule doesn't have all its properties in alphabetical order.
Open

pre {
Severity: Minor
Found in app/assets/stylesheets/scaffold.css by csslint

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

        errors.add(:file, I18n.t("agreement_letters.not_a_file"))
Severity: Minor
Found in app/models/agreement_letter.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"

Space missing to the left of {.
Open

    rejected_applications.map{ |applications_letter| applications_letter.user.email }.join(',')
Severity: Minor
Found in app/models/event.rb by rubocop

Checks that block braces have or don't have a space before the opening brace depending on configuration.

Example:

# bad
foo.map{ |a|
  a.bar.to_s
}

# good
foo.map { |a|
  a.bar.to_s
}

Line is too long. [102/80]
Open

  validates :user, :event, :experience, :motivation, :coding_skills, :emergency_number, presence: true
Severity: Minor
Found in app/models/application_letter.rb by rubocop

Line is too long. [88/80]
Open

  validate :status_cannot_be_changed, :if => Proc.new { |letter| letter.status_changed?}
Severity: Minor
Found in app/models/application_letter.rb by rubocop

Don't use parentheses around a method call.
Open

  validate :deadline_cannot_be_in_the_past, :if => Proc.new { |letter| !(letter.status_changed?) }
Severity: Minor
Found in app/models/application_letter.rb by rubocop

This cop checks for redundant parentheses.

Example:

# bad
(x) if ((y.z).nil?)

# good
x if y.z.nil?

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

      errors.add(:event, "Die Bewerbungen wurden bereits bearbeitet, eine Statusänderung ist nicht mehr erlaubt.")
Severity: Minor
Found in app/models/application_letter.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"

Don't use IDs in selectors.
Open

#event-date-pickers .form-control {
Severity: Minor
Found in app/assets/stylesheets/events.css by csslint

Do not use space inside array brackets.
Open

  enum kind: [ :workshop, :camp ]
Severity: Minor
Found in app/models/event.rb by rubocop

Checks that brackets used for array literals have or don't have surrounding space depending on configuration.

Example: EnforcedStyle: space

# The `space` style enforces that array literals have
# surrounding space.

# bad
array = [a, b, c, d]

# good
array = [ a, b, c, d ]

Example: EnforcedStyle: no_space

# The `no_space` style enforces that array literals have
# no surrounding space.

# bad
array = [ a, b, c, d ]

# good
array = [a, b, c, d]

Example: EnforcedStyle: compact

# The `compact` style normally requires a space inside
# array brackets, with the exception that successive left
# or right brackets are collapsed together in nested arrays.

# bad
array = [ a, [ b, c ] ]

# good
array = [ a, [ b, c ]]

Do not use space inside array brackets.
Open

  enum kind: [ :workshop, :camp ]
Severity: Minor
Found in app/models/event.rb by rubocop

Checks that brackets used for array literals have or don't have surrounding space depending on configuration.

Example: EnforcedStyle: space

# The `space` style enforces that array literals have
# surrounding space.

# bad
array = [a, b, c, d]

# good
array = [ a, b, c, d ]

Example: EnforcedStyle: no_space

# The `no_space` style enforces that array literals have
# no surrounding space.

# bad
array = [ a, b, c, d ]

# good
array = [a, b, c, d]

Example: EnforcedStyle: compact

# The `compact` style normally requires a space inside
# array brackets, with the exception that successive left
# or right brackets are collapsed together in nested arrays.

# bad
array = [ a, [ b, c ] ]

# good
array = [ a, [ b, c ]]

Line is too long. [198/80]
Open

    errors.add(:application_deadline, I18n.t('events.errors.application_deadline_before_start_of_event')) if application_deadline.present? && !date_ranges.blank? && application_deadline > start_date
Severity: Minor
Found in app/models/event.rb by rubocop

Line is too long. [100/80]
Open

    accepted_applications = application_letters.where(status: ApplicationLetter.statuses[:accepted])
Severity: Minor
Found in app/models/event.rb by rubocop

Keep a blank line before and after protected.
Open

  protected
Severity: Minor
Found in app/models/event.rb by rubocop

Access modifiers should be surrounded by blank lines.

Example:

# bad
class Foo
  def bar; end
  private
  def baz; end
end

# good
class Foo
  def bar; end

  private

  def baz; end
end
Severity
Category
Status
Source
Language