kaminari/kaminari

View on GitHub

Showing 270 of 283 total issues

Line is too long. [90/80]
Open

      # * <tt>:params</tt> - url_for parameters for the links (:controller, :action, etc.)

Freeze mutable objects assigned to constants.
Open

  VERSION = '1.2.2'
Severity: Minor
Found in lib/kaminari/version.rb by rubocop

This cop checks whether some constant value isn't a mutable literal (e.g. array or hash).

Example:

# bad
CONST = [1, 2, 3]

# good
CONST = [1, 2, 3].freeze

Gems should be sorted in an alphabetical order within their section of the Gemfile. Gem concurrent-ruby should appear before rake.
Open

gem 'concurrent-ruby', RUBY_VERSION < '2.2' ? '< 1.1.10' : RUBY_VERSION < '2.3' ? '< 1.2' : '>= 1.2'
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'

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

  source "https://rubygems.org"
Severity: Minor
Found in misc/bug_report_template.rb by rubocop

Checks if uses of quotes match the configured preference.

Example: EnforcedStyle: single_quotes (default)

# bad
"No special symbols"
"No string interpolation"
"Just text"

# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"

Example: EnforcedStyle: double_quotes

# bad
'Just some text'
'No special chars or interpolation'

# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

ActiveRecord::Base.establish_connection(adapter: "sqlite3", database: ":memory:")
Severity: Minor
Found in misc/bug_report_template.rb by rubocop

Checks if uses of quotes match the configured preference.

Example: EnforcedStyle: single_quotes (default)

# bad
"No special symbols"
"No string interpolation"
"Just text"

# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"

Example: EnforcedStyle: double_quotes

# bad
'Just some text'
'No special chars or interpolation'

# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"

Line is too long. [81/80]
Open

        "#{request.base_url}#{prev_page_path(scope, options)}" if scope.prev_page

Gem railties requirements already given on line 9 of the Gemfile.
Open

  gem 'railties', git: 'https://github.com/rails/rails.git', branch: '5-2-stable'
Severity: Minor
Found in Gemfile by rubocop

A Gem's requirements should be listed only once in a Gemfile.

Example:

# bad
gem 'rubocop'
gem 'rubocop'

# bad
group :development do
  gem 'rubocop'
end

group :test do
  gem 'rubocop'
end

# good
group :development, :test do
  gem 'rubocop'
end

# good
gem 'rubocop', groups: [:development, :test]

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

  gem 'activerecord', git: 'https://github.com/rails/rails.git', require: 'active_record', branch: '5-2-stable'
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'

Line is too long. [85/80]
Open

  gem 'actionview', git: 'https://github.com/rails/rails.git', require: 'action_view'
Severity: Minor
Found in Gemfile by rubocop

Ternary operators must not be nested. Prefer if or else constructs instead.
Open

gem 'concurrent-ruby', RUBY_VERSION < '2.2' ? '< 1.1.10' : RUBY_VERSION < '2.3' ? '< 1.2' : '>= 1.2'
Severity: Minor
Found in Gemfile by rubocop
Severity
Category
Status
Source
Language