Dalphi/dalphi

View on GitHub

Showing 1,441 of 1,441 total issues

Line is too long. [90/80]
Open

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

Line is too long. [95/80]
Open

    it 'should connect services from different types if exactly one service per type exists' do
Severity: Minor
Found in spec/models/project_spec.rb by rubocop

Line is too long. [97/80]
Open

                                           interface_types: [interface_type_1, interface_type_2])
Severity: Minor
Found in spec/models/project_spec.rb by rubocop

Line is too long. [88/80]
Open

                           data: File.new("#{Rails.root}/spec/fixtures/text/valid2.md"),
Severity: Minor
Found in spec/models/project_spec.rb by rubocop

Line is too long. [108/80]
Open

    @annotation_document_with_different_admin = FactoryGirl.build(:annotation_document_with_different_admin,

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

                                                            name: 'fancy_interface')
Severity: Minor
Found in spec/models/service_spec.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

Extra blank line detected.
Open


      interface_type_2 = FactoryGirl.create(:interface_type, name: 'regular_interface')
Severity: Minor
Found in spec/models/service_spec.rb by rubocop

This cops checks for two or more consecutive blank lines.

Example:

# bad - It has two empty lines.
some_method
# one empty line
# two empty lines
some_method

# good
some_method
# one empty line
some_method

Unnecessary spacing detected.
Open

      @ml_service.interface_types  << interface_type_2
Severity: Minor
Found in spec/models/service_spec.rb by rubocop

This cop checks for extra/unnecessary whitespace.

Example:

# good if AllowForAlignment is true
name      = "RuboCop"
# Some comment and an empty line

website  += "/bbatsov/rubocop" unless cond
puts        "rubocop"          if     debug

# bad for any configuration
set_app("RuboCop")
website  = "https://github.com/bbatsov/rubocop"

Line is too long. [84/80]
Open

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

Redundant curly braces around a hash parameter.
Open

        {
          success: [],
          error: ['invalid1.bin', 'invalid2.bin']
        }
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. [97/80]
Open

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

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

                                             associated_problem_identifiers: %w(ultraNER hyperNER))
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)

Use 2 spaces for indentation in an array, relative to the first position after the preceding left parenthesis.
Open

        interface_type_1
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
                        ]

Use normalcase for variable numbers.
Open

        project_1 = @annotation_document.raw_datum.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

Use normalcase for variable numbers.
Open

      interface_type_1 = FactoryGirl.create(:interface_type, name: 'fancy_interface')
Severity: Minor
Found in spec/models/service_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

    it 'should be unique in the scope of projects and override existing raw_data' do
Severity: Minor
Found in spec/models/raw_datum_spec.rb by rubocop

Use normalcase for variable numbers.
Open

      file_path_2 = Rails.root.join('spec/fixtures/text/invalid2.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

Line is too long. [85/80]
Open

    it 'should not be assigned twice for non disjunct sets of problem identifiers' do
Severity: Minor
Found in spec/models/interface_spec.rb by rubocop

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

Line is too long. [91/80]
Open

    it 'should contain raw_datum, raw_datum.data, raw_datum.id and annotation_documents' do
Severity: Minor
Found in spec/models/project_spec.rb by rubocop
Severity
Category
Status
Source
Language