Dalphi/dalphi

View on GitHub

Showing 1,441 of 1,441 total issues

Redundant self detected.
Open

    self.name
Severity: Minor
Found in app/models/interface_type.rb by rubocop

This cop checks for redundant uses of self.

The usage of self is only needed when:

  • Sending a message to same object with zero arguments in presence of a method name clash with an argument or a local variable.

  • Calling an attribute writer to prevent an local variable assignment.

Note, with using explicit self you can only send messages with public or protected scope, you cannot send private messages this way.

Note we allow uses of self with operators because it would be awkward otherwise.

Example:

# bad
def foo(bar)
  self.baz
end

# good
def foo(bar)
  self.bar  # Resolves name clash with the argument.
end

def foo
  bar = 1
  self.bar  # Resolves name clash with the local variable.
end

def foo
  %w[x y z].select do |bar|
    self.bar == bar  # Resolves name clash with argument of the block.
  end
end

Line exceeds maximum allowed length
Open

      nextPayload[this.currentDocument.interface_type] = this.currentDocument.payload

Line exceeds maximum allowed length
Open

    regexSearchGroup = /.*\/annotate\/([0-9]+)\D*/.exec(document.location.pathname)

Line exceeds maximum allowed length
Open

      $('[data-toggle="tooltip"].compatible').attr('data-original-title', message)

Line exceeds maximum allowed length
Open

    $interfaceContainer.append("<script>#{$interfaceContainer.data('js-script')}</script>")

Line exceeds maximum allowed length
Open

# If you're using CommonJS, RequireJS or some other asynchronous library you can defer execution. Call

Redundant self detected.
Open

    raw_datum = self.raw_data.find_by(id: params['id'])
Severity: Minor
Found in app/models/project.rb by rubocop

This cop checks for redundant uses of self.

The usage of self is only needed when:

  • Sending a message to same object with zero arguments in presence of a method name clash with an argument or a local variable.

  • Calling an attribute writer to prevent an local variable assignment.

Note, with using explicit self you can only send messages with public or protected scope, you cannot send private messages this way.

Note we allow uses of self with operators because it would be awkward otherwise.

Example:

# bad
def foo(bar)
  self.baz
end

# good
def foo(bar)
  self.bar  # Resolves name clash with the argument.
end

def foo
  bar = 1
  self.bar  # Resolves name clash with the local variable.
end

def foo
  %w[x y z].select do |bar|
    self.bar == bar  # Resolves name clash with argument of the block.
  end
end

Align the parameters of a method call if they span more than one line.
Open

    presence: true
Severity: Minor
Found in app/models/raw_datum.rb by rubocop

Here we check if the parameters on a multi-line method call or definition are aligned.

Example: EnforcedStyle: withfirstparameter (default)

# good

foo :bar,
    :baz

# bad

foo :bar,
  :baz

Example: EnforcedStyle: withfixedindentation

# good

foo :bar,
  :baz

# bad

foo :bar,
    :baz

Line exceeds maximum allowed length
Open

      console.log "AnnotationDocumentManager: loaded new annotation document (id: #{data[0].id})"

Line exceeds maximum allowed length
Open

    this.annotationDocumentsEditor = this.initAceEditorWithId('annotation-documents', 'json')

Line exceeds maximum allowed length
Open

# You can require your own javascript files here. By default this will include everything in application, however you

Line exceeds maximum allowed length
Open

# Teaspoon.execute() after everything has been loaded. Simple example of a timeout:

Redundant self detected.
Open

    self.raw_data.each do |raw_datum|
Severity: Minor
Found in app/models/project.rb by rubocop

This cop checks for redundant uses of self.

The usage of self is only needed when:

  • Sending a message to same object with zero arguments in presence of a method name clash with an argument or a local variable.

  • Calling an attribute writer to prevent an local variable assignment.

Note, with using explicit self you can only send messages with public or protected scope, you cannot send private messages this way.

Note we allow uses of self with operators because it would be awkward otherwise.

Example:

# bad
def foo(bar)
  self.baz
end

# good
def foo(bar)
  self.bar  # Resolves name clash with the argument.
end

def foo
  bar = 1
  self.bar  # Resolves name clash with the local variable.
end

def foo
  %w[x y z].select do |bar|
    self.bar == bar  # Resolves name clash with argument of the block.
  end
end

Align the parameters of a method call if they span more than one line.
Open

    attachment_presence: true
Severity: Minor
Found in app/models/raw_datum.rb by rubocop

Here we check if the parameters on a multi-line method call or definition are aligned.

Example: EnforcedStyle: withfirstparameter (default)

# good

foo :bar,
    :baz

# bad

foo :bar,
  :baz

Example: EnforcedStyle: withfixedindentation

# good

foo :bar,
  :baz

# bad

foo :bar,
    :baz

Use %r around regular expression.
Open

    return false, false if filename =~ /\/$/
Severity: Minor
Found in app/models/raw_datum.rb by rubocop

This cop enforces using // or %r around regular expressions.

Example: EnforcedStyle: slashes (default)

# bad
snake_case = %r{^[\dA-Z_]+$}

# bad
regex = %r{
  foo
  (bar)
  (baz)
}x

# good
snake_case = /^[\dA-Z_]+$/

# good
regex = /
  foo
  (bar)
  (baz)
/x

Example: EnforcedStyle: percent_r

# bad
snake_case = /^[\dA-Z_]+$/

# bad
regex = /
  foo
  (bar)
  (baz)
/x

# good
snake_case = %r{^[\dA-Z_]+$}

# good
regex = %r{
  foo
  (bar)
  (baz)
}x

Example: EnforcedStyle: mixed

# bad
snake_case = %r{^[\dA-Z_]+$}

# bad
regex = /
  foo
  (bar)
  (baz)
/x

# good
snake_case = /^[\dA-Z_]+$/

# good
regex = %r{
  foo
  (bar)
  (baz)
}x

Example: AllowInnerSlashes: false (default)

# If `false`, the cop will always recommend using `%r` if one or more
# slashes are found in the regexp string.

# bad
x =~ /home\//

# good
x =~ %r{home/}

Example: AllowInnerSlashes: true

# good
x =~ /home\//

Align the parameters of a method call if they span more than one line.
Open

    presence: true,
    uniqueness: true
Severity: Minor
Found in app/models/interface_type.rb by rubocop

Here we check if the parameters on a multi-line method call or definition are aligned.

Example: EnforcedStyle: withfirstparameter (default)

# good

foo :bar,
    :baz

# bad

foo :bar,
  :baz

Example: EnforcedStyle: withfixedindentation

# good

foo :bar,
  :baz

# bad

foo :bar,
    :baz

Line is too long. [88/80]
Open

      raw, enc = Devise.token_generator.generate(annotator.class, :reset_password_token)
Severity: Minor
Found in app/models/annotator.rb by rubocop

Line exceeds maximum allowed length
Open

# Teaspoon includes some support files, but you can use anything from your own support path too.

Missing top-level module documentation comment.
Open

module UrlResponseChecker

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

Inconsistent indentation detected.
Open

    def compile_stylesheet
      self.compiled_stylesheet = @validator_compiled_stylesheet
    end
Severity: Minor
Found in app/models/interface.rb by rubocop

This cops checks for inconsistent indentation.

Example:

class A
  def test
    puts 'hello'
     puts 'world'
  end
end
Severity
Category
Status
Source
Language