elitmus/omniauth-elitmus

View on GitHub

Showing 126 of 126 total issues

Tab detected.
Open

                end
Severity: Minor
Found in lib/omniauth/strategies/elitmus.rb by rubocop

Redundant curly braces around a hash parameter.
Open

            option :client_options, {
                :site => "https://www.elitmus.com"
            }
Severity: Minor
Found in lib/omniauth/strategies/elitmus.rb by rubocop

This cop checks for braces around the last parameter in a method call if the last parameter is a hash. It supports braces, no_braces and context_dependent styles.

Example: EnforcedStyle: braces

# The `braces` style enforces braces around all method
# parameters that are hashes.

# bad
some_method(x, y, a: 1, b: 2)

# good
some_method(x, y, {a: 1, b: 2})

Example: EnforcedStyle: no_braces (default)

# The `no_braces` style checks that the last parameter doesn't
# have braces around it.

# bad
some_method(x, y, {a: 1, b: 2})

# good
some_method(x, y, a: 1, b: 2)

Example: EnforcedStyle: context_dependent

# The `context_dependent` style checks that the last parameter
# doesn't have braces around it, but requires braces if the
# second to last parameter is also a hash literal.

# bad
some_method(x, y, {a: 1, b: 2})
some_method(x, y, {a: 1, b: 2}, a: 1, b: 2)

# good
some_method(x, y, a: 1, b: 2)
some_method(x, y, {a: 1, b: 2}, {a: 1, b: 2})

Use the return of the conditional for variable assignment and comparison.
Open

                    if params_hash.has_key?['scope']
                        params[:scope] = params_hash['scope']
                    else
                        params[:scope] = DEFAULT_SCOPE
                    end
Severity: Minor
Found in lib/omniauth/strategies/elitmus.rb by rubocop

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

  spec.email         = ["oss@elitmus.com"]
Severity: Minor
Found in omniauth-elitmus.gemspec 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"

Tab detected.
Open

            uid {  raw_info['id']  }
Severity: Minor
Found in lib/omniauth/strategies/elitmus.rb by rubocop

Tab detected.
Open

            extra do
Severity: Minor
Found in lib/omniauth/strategies/elitmus.rb by rubocop

Tab detected.
Open

                    # %w[scope auth_type].each do |val|
Severity: Minor
Found in lib/omniauth/strategies/elitmus.rb by rubocop

Tab detected.
Open

                    end
Severity: Minor
Found in lib/omniauth/strategies/elitmus.rb by rubocop

Tab detected.
Open

                hash.delete_if do |_, value|
Severity: Minor
Found in lib/omniauth/strategies/elitmus.rb by rubocop

Tab detected.
Open

            end
Severity: Minor
Found in lib/omniauth/strategies/elitmus.rb by rubocop

Tab detected.
Open

                        params[:scope] = params_hash['scope']
Severity: Minor
Found in lib/omniauth/strategies/elitmus.rb by rubocop

end at 75, 7 is not aligned with def at 70, 3.
Open

             end
Severity: Minor
Found in lib/omniauth/strategies/elitmus.rb by rubocop

This cop checks whether the end keywords of method definitions are aligned properly.

Two modes are supported through the EnforcedStyleAlignWith configuration parameter. If it's set to start_of_line (which is the default), the end shall be aligned with the start of the line where the def keyword is. If it's set to def, the end shall be aligned with the def keyword.

Example: EnforcedStyleAlignWith: startofline (default)

# bad

private def foo
            end

# good

private def foo
end

Example: EnforcedStyleAlignWith: def

# bad

private def foo
            end

# good

private def foo
        end

Tab detected.
Open

            end
Severity: Minor
Found in lib/omniauth/strategies/elitmus.rb by rubocop

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

                :site => "https://www.elitmus.com"
Severity: Minor
Found in lib/omniauth/strategies/elitmus.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

  spec.license       = "MIT"
Severity: Minor
Found in omniauth-elitmus.gemspec 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 2 (not 1) spaces for indentation.
Open

            DEFAULT_SCOPE = 'public'
Severity: Minor
Found in lib/omniauth/strategies/elitmus.rb by rubocop

This cops checks for indentation that doesn't use the specified number of spaces.

See also the IndentationConsistency cop which is the companion to this one.

Example:

# bad
class A
 def test
  puts 'hello'
 end
end

# good
class A
  def test
    puts 'hello'
  end
end

Example: IgnoredPatterns: ['^\s*module']

# bad
module A
class B
  def test
  puts 'hello'
  end
end
end

# good
module A
class B
  def test
    puts 'hello'
  end
end
end

Tab detected.
Open

            #OATUH2_PROVIDER_URL = "https://www.elitmus.com"
Severity: Minor
Found in lib/omniauth/strategies/elitmus.rb by rubocop

Unnecessary spacing detected.
Open

                    params[:auth_type] = params_hash['auth_type']  if params_hash.has_key?['auth_type']
Severity: Minor
Found in lib/omniauth/strategies/elitmus.rb by rubocop

This cop checks for extra/unnecessary whitespace.

Example:

# good if AllowForAlignment is true
name      = "RuboCop"
# Some comment and an empty line

website  += "/bbatsov/rubocop" unless cond
puts        "rubocop"          if     debug

# bad for any configuration
set_app("RuboCop")
website  = "https://github.com/bbatsov/rubocop"

Tab detected.
Open

                        params[:scope] = DEFAULT_SCOPE
Severity: Minor
Found in lib/omniauth/strategies/elitmus.rb by rubocop

Indent the right brace the same as the first position after the preceding left parenthesis.
Open

                 })
Severity: Minor
Found in lib/omniauth/strategies/elitmus.rb by rubocop

This cops checks the indentation of the first key in a hash literal where the opening brace and the first key are on separate lines. The other keys' indentations are handled by the AlignHash cop.

By default, Hash literals that are arguments in a method call with parentheses, and where the opening curly brace of the hash is on the same line as the opening parenthesis of the method call, shall have their first key indented one step (two spaces) more than the position inside the opening parenthesis.

Other hash literals shall have their first key indented one step more than the start of the line where the opening curly brace is.

This default style is called 'specialinsideparentheses'. Alternative styles are 'consistent' and 'align_braces'. Here are examples:

Example: EnforcedStyle: specialinsideparentheses (default)

# The `special_inside_parentheses` style enforces that the first key
# in a hash literal where the opening brace and the first key are on
# separate lines is indented one step (two spaces) more than the
# position inside the opening parentheses.

# bad
hash = {
  key: :value
}
and_in_a_method_call({
  no: :difference
                     })

# good
special_inside_parentheses
hash = {
  key: :value
}
but_in_a_method_call({
                       its_like: :this
                     })

Example: EnforcedStyle: consistent

# The `consistent` style enforces that the first key in a hash
# literal where the opening brace and the first key are on
# seprate lines is indented the same as a hash literal which is not
# defined inside a method call.

# bad
hash = {
  key: :value
}
but_in_a_method_call({
                       its_like: :this
                      })

# good
hash = {
  key: :value
}
and_in_a_method_call({
  no: :difference
})

Example: EnforcedStyle: align_braces

# The `align_brackets` style enforces that the opening and closing
# braces are indented to the same position.

# bad
and_now_for_something = {
                          completely: :different
}

# good
and_now_for_something = {
                          completely: :different
                        }
Severity
Category
Status
Source
Language