wrstudios/frodata

View on GitHub
lib/frodata/query/criteria.rb

Summary

Maintainability
A
0 mins
Test Coverage

FrOData::Query::Criteria has at least 5 instance variables
Open

    class Criteria
Severity: Minor
Found in lib/frodata/query/criteria.rb by reek

Too Many Instance Variables is a special case of LargeClass.

Example

Given this configuration

TooManyInstanceVariables:
  max_instance_variables: 3

and this code:

class TooManyInstanceVariables
  def initialize
    @arg_1 = :dummy
    @arg_2 = :dummy
    @arg_3 = :dummy
    @arg_4 = :dummy
  end
end

Reek would emit the following warning:

test.rb -- 5 warnings:
  [1]:TooManyInstanceVariables has at least 4 instance variables (TooManyInstanceVariables)

Avoid rescuing without specifying an error class.
Open

      rescue
Severity: Minor
Found in lib/frodata/query/criteria.rb by rubocop

This cop checks for rescuing StandardError. There are two supported styles implicit and explicit. This cop will not register an offense if any error other than StandardError is specified.

Example: EnforcedStyle: implicit

# `implicit` will enforce using `rescue` instead of
# `rescue StandardError`.

# bad
begin
  foo
rescue StandardError
  bar
end

# good
begin
  foo
rescue
  bar
end

# good
begin
  foo
rescue OtherError
  bar
end

# good
begin
  foo
rescue StandardError, SecurityError
  bar
end

Example: EnforcedStyle: explicit (default)

# `explicit` will enforce using `rescue StandardError`
# instead of `rescue`.

# bad
begin
  foo
rescue
  bar
end

# good
begin
  foo
rescue StandardError
  bar
end

# good
begin
  foo
rescue OtherError
  bar
end

# good
begin
  foo
rescue StandardError, SecurityError
  bar
end

Line is too long. [87/80]
Open

        "#{property_name}/#{function}(d:d/#{argument} #{operator} #{url_value(value)})"
Severity: Minor
Found in lib/frodata/query/criteria.rb by rubocop

There are no issues that match your filters.

Category
Status