znamenica/dneslov

View on GitHub

Showing 2,171 of 2,171 total issues

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

    ENV["GEM_PATH"] = ([Bundler.bundle_path.to_s] + Gem.path).join(File::PATH_SEPARATOR)
Severity: Minor
Found in bin/spring 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

require "capistrano/scm/git"
Severity: Minor
Found in Capfile 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"

Space inside parentheses detected.
Open

         @current_user ||= JwToken.decode( session['jwt'] )[0]['sub'])
Severity: Minor
Found in lib/concerns/auth.rb by rubocop

Checks for spaces inside ordinary round parentheses.

Example:

# bad
f( 3)
g = (a + 3 )

# good
f(3)
g = (a + 3)

Space missing after semicolon.
Open

            true; end;end;end;end
Severity: Minor
Found in lib/tasks/import.rake by rubocop

Checks for semicolon (;) not followed by some kind of space.

Example:

# bad
x = 1;y = 2

# good
x = 1; y = 2

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

   desc "Fix root_id in names"
Severity: Minor
Found in lib/tasks/fix.rake 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"

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

gem 'acts_as_list'
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'

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

   gem 'bcrypt_pbkdf', '~> 1.1'
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'

Put a space before an end-of-line comment.
Open

gem 'redis-rails'#, bitbucket: 'redis-store/redis-rails'
Severity: Minor
Found in Gemfile by rubocop

This cop checks for missing space between a token and a comment on the same line.

Example:

# bad
1 + 1# this operation does ...

# good
1 + 1 # this operation does ...

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

gem 'dotenv-rails', require: 'dotenv/rails-now', bitbucket: "majioa/dotenv"
Severity: Minor
Found in Gemfile 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

gem "rails", "~> 7.0.0", ">= 7.0.4.1"
Severity: Minor
Found in Gemfile 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

gem "jsonize", "~> 0.2"
Severity: Minor
Found in Gemfile 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

   gem "capistrano3-nginx", require: false, git: "https://github.com/treenewbee/capistrano3-nginx.git"
Severity: Minor
Found in Gemfile 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

   gem "capistrano-systemd-multiservice", require: false, git: "https://github.com/majioa/capistrano-systemd-multiservice.git"
Severity: Minor
Found in Gemfile 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

   gem "email_spec"
Severity: Minor
Found in Gemfile 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"

Use && instead of and.
Open

      scope.where(:id => record.id).exists? and !@user.nil?
Severity: Minor
Found in app/policies/reading_policy.rb by rubocop

This cop checks for uses of and and or, and suggests using && and || instead. It can be configured to check only in conditions, or in all contexts.

Example: EnforcedStyle: always (default)

# bad
foo.save and return

# bad
if foo and bar
end

# good
foo.save && return

# good
if foo && bar
end

Example: EnforcedStyle: conditionals

# bad
if foo and bar
end

# good
foo.save && return

# good
foo.save and return

# good
if foo && bar
end

Duplicated key in hash literal.
Open

         ('01.08'..'14.08') => {
Severity: Minor
Found in app/services/memo_service.rb by rubocop

This cop checks for duplicated keys in hash literals.

This cop mirrors a warning in Ruby 2.2.

Example:

# bad

hash = { food: 'apple', food: 'orange' }

Example:

# good

hash = { food: 'apple', other_food: 'orange' }

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

   def initialize calendary, add_date = Time.now.strptime("%d.%m.%Y %H:%M")
Severity: Minor
Found in app/services/memo_service.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"

Interpolation in single quoted string detected. Use double quoted strings if you need interpolation.
Open

               ру_РУ: "Среда \#{week}-я по Пасхе"
Severity: Minor
Found in app/services/memo_service.rb by rubocop

This cop checks for interpolation in a single quoted string.

Example:

# bad

foo = 'something with #{interpolation} inside'

Example:

# good

foo = "something with #{interpolation} inside"

unexpected token $end (Using Ruby 2.1 parser; configure using TargetRubyVersion parameter, under AllCops)
Open

Severity: Minor
Found in app/services/calendary_copy.rb by rubocop

Interpolation in single quoted string detected. Use double quoted strings if you need interpolation.
Open

               ру_РУ: "\#{weekday} \{week}-я Петрова поста"
Severity: Minor
Found in app/services/memo_service.rb by rubocop

This cop checks for interpolation in a single quoted string.

Example:

# bad

foo = 'something with #{interpolation} inside'

Example:

# good

foo = "something with #{interpolation} inside"
Severity
Category
Status
Source
Language