Dalphi/dalphi

View on GitHub

Showing 1,441 of 1,441 total issues

Use normalcase for variable numbers.
Open

        project_2 = FactoryGirl.create(:another_project)

This cop makes sure that all numbered variables use the configured style, snakecase, normalcase or noninteger, for their numbering.

Example: EnforcedStyle: snake_case

# bad

variable1 = 1

# good

variable_1 = 1

Example: EnforcedStyle: normalcase (default)

# bad

variable_1 = 1

# good

variable1 = 1

Example: EnforcedStyle: non_integer

# bad

variable1 = 1

variable_1 = 1

# good

variableone = 1

variable_one = 1

Line is too long. [81/80]
Open

    it 'should be unique, so that two services with the same URL cannot exist' do
Severity: Minor
Found in spec/models/service_spec.rb by rubocop

Pass &:to_a as an argument to map instead of a block.
Open

      alphabet = [('a'..'z'), ('A'..'Z'), (0..9)].map { |i| i.to_a }.flatten.concat(['_', '-', '.'])
Severity: Minor
Found in spec/models/service_spec.rb by rubocop

Use symbols as procs when possible.

Example:

# bad
something.map { |s| s.upcase }

# good
something.map(&:upcase)

Use normalcase for variable numbers.
Open

      file_path_2 = Rails.root.join('spec/fixtures/text/invalid.bin')
Severity: Minor
Found in spec/models/raw_datum_spec.rb by rubocop

This cop makes sure that all numbered variables use the configured style, snakecase, normalcase or noninteger, for their numbering.

Example: EnforcedStyle: snake_case

# bad

variable1 = 1

# good

variable_1 = 1

Example: EnforcedStyle: normalcase (default)

# bad

variable_1 = 1

# good

variable1 = 1

Example: EnforcedStyle: non_integer

# bad

variable1 = 1

variable_1 = 1

# good

variableone = 1

variable_one = 1

Use normalcase for variable numbers.
Open

      interface_type_1 = FactoryGirl.create(:interface_type)
Severity: Minor
Found in spec/models/project_spec.rb by rubocop

This cop makes sure that all numbered variables use the configured style, snakecase, normalcase or noninteger, for their numbering.

Example: EnforcedStyle: snake_case

# bad

variable1 = 1

# good

variable_1 = 1

Example: EnforcedStyle: normalcase (default)

# bad

variable_1 = 1

# good

variable1 = 1

Example: EnforcedStyle: non_integer

# bad

variable1 = 1

variable_1 = 1

# good

variableone = 1

variable_one = 1

Line is too long. [84/80]
Open

        common_project = @annotation_document_with_different_admin.raw_datum.project

Line is too long. [85/80]
Open

                                                             name: 'fancy_interface')
Severity: Minor
Found in spec/models/service_spec.rb by rubocop

Use normalcase for variable numbers.
Open

      file_path_1 = Rails.root.join('spec/fixtures/text/valid1.md')
Severity: Minor
Found in spec/models/raw_datum_spec.rb by rubocop

This cop makes sure that all numbered variables use the configured style, snakecase, normalcase or noninteger, for their numbering.

Example: EnforcedStyle: snake_case

# bad

variable1 = 1

# good

variable_1 = 1

Example: EnforcedStyle: normalcase (default)

# bad

variable_1 = 1

# good

variable1 = 1

Example: EnforcedStyle: non_integer

# bad

variable1 = 1

variable_1 = 1

# good

variableone = 1

variable_one = 1

Line is too long. [97/80]
Open

      @interface.stylesheet = File.new("#{Rails.root}/spec/fixtures/interfaces/text_nominal.css")
Severity: Minor
Found in spec/models/interface_spec.rb by rubocop

%w-literals should be delimited by [ and ].
Open

      @interface.associated_problem_identifiers = %w(ner superNER)
Severity: Minor
Found in spec/models/interface_spec.rb by rubocop

This cop enforces the consistent usage of %-literal delimiters.

Specify the 'default' key to set all preferred delimiters at once. You can continue to specify individual preferred delimiters to override the default.

Example:

# Style/PercentLiteralDelimiters:
#   PreferredDelimiters:
#     default: '[]'
#     '%i':    '()'

# good
%w[alpha beta] + %i(gamma delta)

# bad
%W(alpha #{beta})

# bad
%I(alpha beta)

Line is too long. [110/80]
Open

      @project.machine_learning_service = FactoryGirl.create(:machine_learning_service, problem_id: 'MegaNER')
Severity: Minor
Found in spec/models/project_spec.rb by rubocop

Redundant curly braces around a hash parameter.
Open

        {
          success: ['root_file.md', 'subdir/file.md'],
          error: []
        }
Severity: Minor
Found in spec/models/raw_datum_spec.rb by rubocop

This cop checks for braces around the last parameter in a method call if the last parameter is a hash. It supports braces, no_braces and context_dependent styles.

Example: EnforcedStyle: braces

# The `braces` style enforces braces around all method
# parameters that are hashes.

# bad
some_method(x, y, a: 1, b: 2)

# good
some_method(x, y, {a: 1, b: 2})

Example: EnforcedStyle: no_braces (default)

# The `no_braces` style checks that the last parameter doesn't
# have braces around it.

# bad
some_method(x, y, {a: 1, b: 2})

# good
some_method(x, y, a: 1, b: 2)

Example: EnforcedStyle: context_dependent

# The `context_dependent` style checks that the last parameter
# doesn't have braces around it, but requires braces if the
# second to last parameter is also a hash literal.

# bad
some_method(x, y, {a: 1, b: 2})
some_method(x, y, {a: 1, b: 2}, a: 1, b: 2)

# good
some_method(x, y, a: 1, b: 2)
some_method(x, y, {a: 1, b: 2}, {a: 1, b: 2})

Line is too long. [90/80]
Open

      @interface.stylesheet = File.new("#{Rails.root}/spec/fixtures/interfaces/empty.css")
Severity: Minor
Found in spec/models/interface_spec.rb by rubocop

Line is too long. [113/80]
Open

        file.write('$strong-font-size: 2rem; p { text-align: center; strong { font-size: $strong-font-size; } }')
Severity: Minor
Found in spec/models/interface_spec.rb by rubocop

Indent the right bracket the same as the first position after the preceding left parenthesis.
Open

      ])
Severity: Minor
Found in spec/models/project_spec.rb by rubocop

This cop checks the indentation of the first element in an array literal where the opening bracket and the first element are on separate lines. The other elements' indentations are handled by the AlignArray cop.

By default, array literals that are arguments in a method call with parentheses, and where the opening square bracket of the array is on the same line as the opening parenthesis of the method call, shall have their first element indented one step (two spaces) more than the position inside the opening parenthesis.

Other array literals shall have their first element indented one step more than the start of the line where the opening square bracket is.

This default style is called 'specialinsideparentheses'. Alternative styles are 'consistent' and 'align_brackets'. Here are examples:

Example: EnforcedStyle: specialinsideparentheses (default)

# The `special_inside_parentheses` style enforces that the first
# element in an array literal where the opening bracket and first
# element are on seprate lines is indented one step (two spaces) more
# than the position inside the opening parenthesis.

#bad
array = [
  :value
]
and_in_a_method_call([
  :no_difference
                     ])

#good
array = [
  :value
]
but_in_a_method_call([
                       :its_like_this
                     ])

Example: EnforcedStyle: consistent

# The `consistent` style enforces that the first element in an array
# literal where the opening bracket and the first element are on
# seprate lines is indented the same as an array literal which is not
# defined inside a method call.

#bad
# consistent
array = [
  :value
]
but_in_a_method_call([
                       :its_like_this
])

#good
array = [
  :value
]
and_in_a_method_call([
  :no_difference
])

Example: EnforcedStyle: align_brackets

# The `align_brackets` style enforces that the opening and closing
# brackets are indented to the same position.

#bad
# align_brackets
and_now_for_something = [
                          :completely_different
]

#good
# align_brackets
and_now_for_something = [
                          :completely_different
                        ]

Line is too long. [84/80]
Open

      @project.merge_service = FactoryGirl.create(:merge_service, problem_id: 'NER')
Severity: Minor
Found in spec/models/project_spec.rb by rubocop

Align ) with (.
Open

      )
Severity: Minor
Found in spec/models/raw_datum_spec.rb by rubocop

This cops checks the indentation of hanging closing parentheses in method calls, method definitions, and grouped expressions. A hanging closing parenthesis means ) preceded by a line break.

Example:

# good: when x is on its own line, indent this way
func(
  x,
  y
)

# good: when x follows opening parenthesis, align parentheses
a = b * (x +
         y
        )

# bad
def func(
  x,
  y
  )
end

Closing method call brace must be on the same line as the last argument when opening brace is on the same line as the first argument.
Open

      )
Severity: Minor
Found in spec/models/raw_datum_spec.rb by rubocop

This cop checks that the closing brace in a method call is either on the same line as the last method argument, or a new line.

When using the symmetrical (default) style:

If a method call's opening brace is on the same line as the first argument of the call, then the closing brace should be on the same line as the last argument of the call.

If an method call's opening brace is on the line above the first argument of the call, then the closing brace should be on the line below the last argument of the call.

When using the new_line style:

The closing brace of a multi-line method call must be on the line after the last argument of the call.

When using the same_line style:

The closing brace of a multi-line method call must be on the same line as the last argument of the call.

Example:

# symmetrical: bad
  # new_line: good
  # same_line: bad
  foo(a,
    b
  )

  # symmetrical: bad
  # new_line: bad
  # same_line: good
  foo(
    a,
    b)

  # symmetrical: good
  # new_line: bad
  # same_line: good
  foo(a,
    b)

  # symmetrical: good
  # new_line: good
  # same_line: bad
  foo(
    a,
    b
  )

Line is too long. [81/80]
Open

      @interface.associated_problem_identifiers = ['ner', 'image classification']
Severity: Minor
Found in spec/models/interface_spec.rb by rubocop

Line is too long. [105/80]
Open

      @interface.stylesheet = File.new("#{Rails.root}/spec/fixtures/interfaces/text_nominal_invalid.css")
Severity: Minor
Found in spec/models/interface_spec.rb by rubocop
Severity
Category
Status
Source
Language