wakelank/Tinsl

View on GitHub

Showing 833 of 833 total issues

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

        adj = adj_response[0]["word"]

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"

Rule doesn't have all its properties in alphabetical order.
Open

.title {
Severity: Minor
Found in app/assets/stylesheets/styles.css by csslint

Trailing whitespace detected.
Open

  

Missing top-level class documentation comment.
Open

class EmailValidator < ActiveModel::EachValidator
Severity: Minor
Found in app/validators/email_validator.rb by rubocop

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

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

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

  require "rubygems"
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"

Use == if you meant to do a comparison or wrap the expression in parentheses to indicate you meant to assign in a condition.
Open

  if match = Bundler.default_lockfile.read.match(/^GEM$.*?^    spring \((.*?)\)$.*?^$/m)
Severity: Minor
Found in bin/spring by rubocop

This cop checks for assignments in the conditions of if/while/until.

Example:

# bad

if some_var = true
  do_something
end

Example:

# good

if some_var == true
  do_something
end

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

    ENV["GEM_HOME"] = ""
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"

Rule doesn't have all its properties in alphabetical order.
Open

.nice_border {
Severity: Minor
Found in app/assets/stylesheets/styles.css by csslint

Rule doesn't have all its properties in alphabetical order.
Open

.movie {
Severity: Minor
Found in app/assets/stylesheets/styles.css by csslint

Don't use parentheses around a method call.
Open

        if (params[:gen_title])

This cop checks for redundant parentheses.

Example:

# bad
(x) if ((y.z).nil?)

# good
x if y.z.nil?

Rule doesn't have all its properties in alphabetical order.
Open

.movie_rank {
Severity: Minor
Found in app/assets/stylesheets/styles.css by csslint

Trailing whitespace detected.
Open

  

Prefer the use of the nil? predicate.
Open

    redirect_to log_in_path if current_user == nil

This cop checks for comparison of something with nil using ==.

Example:

# bad
if x == nil
end

# good
if x.nil?
end

Line is too long. [128/80]
Open

# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
Severity: Minor
Found in Gemfile by rubocop

Rule doesn't have all its properties in alphabetical order.
Open

button {
Severity: Minor
Found in app/assets/stylesheets/styles.css by csslint

Don't use IDs in selectors.
Open

#adjacent_ranking {
Severity: Minor
Found in app/assets/stylesheets/styles.css by csslint

Don't use parentheses around the condition of an if.
Open

        if (params[:gen_title])

This cop checks for the presence of superfluous parentheses around the condition of if/unless/while/until.

Example:

# bad
x += 1 while (x < 10)
foo unless (bar || baz)

if (x > 10)
elsif (x < 3)
end

# good
x += 1 while x < 10
foo unless bar || baz

if x > 10
elsif x < 3
end

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

        noun_url="http://api.wordnik.com:80/v4/words.json/randomWords?hasDictionaryDef=false&includePartOfSpeech=noun&minCorpusCount=0&maxCorpusCount=-1&minDictionaryCount=1&maxDictionaryCount=-1&minLength=5&maxLength=-1&limit=1&api_key="

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 a guard clause instead of wrapping the code inside a conditional expression.
Open

    unless value =~ /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i
Severity: Minor
Found in app/validators/email_validator.rb by rubocop

Use a guard clause instead of wrapping the code inside a conditional expression

Example:

# bad
def test
  if something
    work
  end
end

# good
def test
  return unless something
  work
end

# also good
def test
  work if something
end

# bad
if something
  raise 'exception'
else
  ok
end

# good
raise 'exception' if something
ok
Severity
Category
Status
Source
Language