Dalphi/dalphi

View on GitHub

Showing 1,441 of 1,441 total issues

Line is too long. [98/80]
Open

        raw_data_per_page = Rails.configuration.x.dalphi['paginated-objects-per-page']['raw-data']

Use %i or %I for an array of symbols.
Open

                only: [:show, :edit, :update, :destroy]

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]

Missing top-level class documentation comment.
Open

class ApplicationController < ActionController::Base

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 converted_attributes
      new_params = interface_params
      associated_problems = interface_params['associated_problem_identifiers']
      if associated_problems
        new_params['associated_problem_identifiers'] = associated_problems.strip

This cops checks for inconsistent indentation.

Example:

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

Line is too long. [81/80]
Open

    redirect_to interface_interface_type_path(@interface) if interface_type_error

Line is too long. [83/80]
Open

        interface_type = InterfaceType.find_or_create_by(name: interface_type_name)

Line is too long. [87/80]
Open

    per_page = Rails.configuration.x.dalphi['paginated-objects-per-page']['statistics']

Inconsistent indentation detected.
Open

    def converted_attributes
      interface_type_ids = service_params[:interface_types]
      return service_params unless interface_type_ids and interface_type_ids.any?

      converted_params = service_params

This cops checks for inconsistent indentation.

Example:

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

Line is too long. [98/80]
Open

    raise ActionController::RoutingError.new('Not Found') unless Service.roles.keys.include?(role)

Line is too long. [84/80]
Open

            key :description, I18n.t('api.annotation_document.destroy.response-200')

Line is too long. [82/80]
Open

          key :description, 'Identifies the service that is operating at this URL'

Inconsistent indentation detected.
Open

    def set_raw_data
      @raw_data = @project.raw_data
    end

This cops checks for inconsistent indentation.

Example:

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

Line is too long. [82/80]
Open

      flash.now[:error] = I18n.t('simple_form.error_notification.default_message')

Do not use :: for method calls.
Open

      @problem_identifiers = Service::problem_identifiers

This cop checks for methods invoked via the :: operator instead of the . operator (like FileUtils::rmdir instead of FileUtils.rmdir).

Example:

# bad
Timeout::timeout(500) { do_something }
FileUtils::rmdir(dir)
Marshal::dump(obj)

# good
Timeout.timeout(500) { do_something }
FileUtils.rmdir(dir)
Marshal.dump(obj)

Line is too long. [93/80]
Open

                   .select { |annotator| !@project || annotator.projects.include?(@project) }

Missing top-level class documentation comment.
Open

class ServicesController < ApplicationController

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

Line is too long. [81/80]
Open

            key :description, I18n.t('api.annotation_document.show.response-400')

Line is too long. [81/80]
Open

          key :description, I18n.t('api.annotation_document.destroy.description')

Inconsistent indentation detected.
Open

    def raw_datum_params
      data = { data: [] }
      data = :data if action_name == 'update'
      params.require(:raw_datum).permit(:shape, data)
    end

This cops checks for inconsistent indentation.

Example:

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

Inconsistent indentation detected.
Open

    def set_problem_identifiers
      @problem_identifiers = Service::problem_identifiers
    end

This cops checks for inconsistent indentation.

Example:

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