zeisler/active_mocker

View on GitHub

Showing 235 of 235 total issues

Use only ascii symbols in comments. (https://github.com/bbatsov/ruby-style-guide#english-comments)
Open

    #   # => #<User id: 1, first_name: "Penélope", last_name: nil>
Severity: Minor
Found in lib/active_mocker/mock/queries.rb by rubocop

This cop checks for non-ascii (non-English) characters in comments. You could set an array of allowed non-ascii chars in AllowedChars attribute (empty by default).

Example:

# bad
# Translates from English to 日本語。

# good
# Translates from English to Japanese

Add an empty line after magic comments. (https://github.com/bbatsov/ruby-style-guide#separate-magic-comments-from-code)
Open

source "https://rubygems.org"
Severity: Minor
Found in Gemfile by rubocop

Checks for a newline after the final magic comment.

Example:

# good
# frozen_string_literal: true

# Some documentation for Person
class Person
  # Some code
end

# bad
# frozen_string_literal: true
# Some documentation for Person
class Person
  # Some code
end

Add an empty line after magic comments. (https://github.com/bbatsov/ruby-style-guide#separate-magic-comments-from-code)
Open

module ActiveMocker

Checks for a newline after the final magic comment.

Example:

# good
# frozen_string_literal: true

# Some documentation for Person
class Person
  # Some code
end

# bad
# frozen_string_literal: true
# Some documentation for Person
class Person
  # Some code
end

Unused method argument - arguments. (https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars)
Open

    def call_mock_method(method:, caller:, arguments: [])
Severity: Minor
Found in lib/active_mocker/mock/base.rb by rubocop

This cop checks for unused method arguments.

Example:

# bad

def some_method(used, unused, _unused_but_allowed)
  puts used
end

Example:

# good

def some_method(used, _unused, _unused_but_allowed)
  puts used
end

Rename is_of to of?. (https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark)
Open

      def is_of(conditions = {})
Severity: Minor
Found in lib/active_mocker/mock/queries.rb by rubocop

This cop makes sure that predicates are named properly.

Example:

# bad
def is_even?(value)
end

# good
def even?(value)
end

# bad
def has_value?
end

# good
def value?
end

Use only ascii symbols in comments. (https://github.com/bbatsov/ruby-style-guide#english-comments)
Open

    #   UserMock.find_or_create_by(first_name: 'Penélope')
Severity: Minor
Found in lib/active_mocker/mock/queries.rb by rubocop

This cop checks for non-ascii (non-English) characters in comments. You could set an array of allowed non-ascii chars in AllowedChars attribute (empty by default).

Example:

# bad
# Translates from English to 日本語。

# good
# Translates from English to Japanese

Add an empty line after magic comments. (https://github.com/bbatsov/ruby-style-guide#separate-magic-comments-from-code)
Open

module ActiveMocker

Checks for a newline after the final magic comment.

Example:

# good
# frozen_string_literal: true

# Some documentation for Person
class Person
  # Some code
end

# bad
# frozen_string_literal: true
# Some documentation for Person
class Person
  # Some code
end

Gems should be sorted in an alphabetical order within their section of the Gemfile. Gem appraisal should appear before sqlite3.
Open

gem "appraisal"
Severity: Minor
Found in Gemfile by rubocop

Gems should be alphabetically sorted within groups.

Example:

# bad
gem 'rubocop'
gem 'rspec'

# good
gem 'rspec'
gem 'rubocop'

# good
gem 'rubocop'

gem 'rspec'

# good only if TreatCommentsAsGroupSeparators is true
# For code quality
gem 'rubocop'
# For tests
gem 'rspec'

Add an empty line after magic comments. (https://github.com/bbatsov/ruby-style-guide#separate-magic-comments-from-code)
Open

require "active_mocker/inspectable/bigdecimal"
Severity: Minor
Found in lib/active_mocker/inspectable.rb by rubocop

Checks for a newline after the final magic comment.

Example:

# good
# frozen_string_literal: true

# Some documentation for Person
class Person
  # Some code
end

# bad
# frozen_string_literal: true
# Some documentation for Person
class Person
  # Some code
end

Line is too long. [124/120] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
Open

        # @param [Array<Symbol, String, ActiveMocker::Mock>] args an array of ActiveRecord Model Names as Strings or Symbols
Severity: Minor
Found in lib/active_mocker/loaded_mocks.rb by rubocop

Line is too long. [124/120] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
Open

    def initialize(parsed_source:, klasses_to_be_mocked:, mock_append_name:, active_record_base_klass: ::ActiveRecord::Base)
Severity: Minor
Found in lib/active_mocker/parent_class.rb by rubocop

When defining the == operator, name its argument other. (https://github.com/bbatsov/ruby-style-guide#other-arg)
Open

    def ==(val)

This cop makes sure that certain binary operator methods have their sole parameter named other.

Example:

# bad
def +(amount); end

# good
def +(other); end

Line is too long. [128/120] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
Open

    # Returns +true+ if the specified +attribute+ has been set and is neither +nil+ nor <tt>empty?</tt> (the latter only applies
Severity: Minor
Found in lib/active_mocker/mock/base.rb by rubocop

Rename has_attribute? to attribute?. (https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark)
Open

    def has_attribute?(attr_name)
Severity: Minor
Found in lib/active_mocker/mock/base.rb by rubocop

This cop makes sure that predicates are named properly.

Example:

# bad
def is_even?(value)
end

# good
def even?(value)
end

# bad
def has_value?
end

# good
def value?
end

Use only ascii symbols in comments. (https://github.com/bbatsov/ruby-style-guide#english-comments)
Open

    #   UserMock.find_or_create_by(first_name: 'Penélope')
Severity: Minor
Found in lib/active_mocker/mock/queries.rb by rubocop

This cop checks for non-ascii (non-English) characters in comments. You could set an array of allowed non-ascii chars in AllowedChars attribute (empty by default).

Example:

# bad
# Translates from English to 日本語。

# good
# Translates from English to Japanese
Severity
Category
Status
Source
Language