elitmus/omniauth-elitmus

View on GitHub

Showing 126 of 126 total issues

Tab detected.
Open

                    prune!(value) if value.is_a?(Hash)
Severity: Minor
Found in lib/omniauth/strategies/elitmus.rb by rubocop

Unnecessary spacing detected.
Open

            uid {  raw_info['id']  }
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

                    'email' => raw_info['email'],
Severity: Minor
Found in lib/omniauth/strategies/elitmus.rb by rubocop

Tab detected.
Open

                    #             params[val.to_sym] = request.params[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

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

Line is too long. [88/80]
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

Use the new Ruby 1.9 hash syntax.
Open

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

This cop checks hash literal syntax.

It can enforce either the use of the class hash rocket syntax or the use of the newer Ruby 1.9 syntax (when applicable).

A separate offense is registered for each problematic pair.

The supported styles are:

  • ruby19 - forces use of the 1.9 syntax (e.g. {a: 1}) when hashes have all symbols for keys
  • hash_rockets - forces use of hash rockets for all hashes
  • nomixedkeys - simply checks for hashes with mixed syntaxes
  • ruby19nomixed_keys - forces use of ruby 1.9 syntax and forbids mixed syntax hashes

Example: EnforcedStyle: ruby19 (default)

# bad
{:a => 2}
{b: 1, :c => 2}

# good
{a: 2, b: 1}
{:c => 2, 'd' => 2} # acceptable since 'd' isn't a symbol
{d: 1, 'e' => 2} # technically not forbidden

Example: EnforcedStyle: hash_rockets

# bad
{a: 1, b: 2}
{c: 1, 'd' => 5}

# good
{:a => 1, :b => 2}

Example: EnforcedStyle: nomixedkeys

# bad
{:a => 1, b: 2}
{c: 1, 'd' => 2}

# good
{:a => 1, :b => 2}
{c: 1, d: 2}

Example: EnforcedStyle: ruby19nomixed_keys

# bad
{:a => 1, :b => 2}
{c: 2, 'd' => 3} # should just use hash rockets

# good
{a: 1, b: 2}
{:c => 3, 'd' => 4}

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

  spec.require_paths = ["lib"]
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"

The name of this source file (omniauth-elitmus.rb) should use snake_case.
Open

require 'omniauth/elitmus'
Severity: Minor
Found in lib/omniauth-elitmus.rb by rubocop

This cop makes sure that Ruby source files have snake_case names. Ruby scripts (i.e. source files with a shebang in the first line) are ignored.

Example:

# bad
lib/layoutManager.rb

anything/usingCamelCase

# good
lib/layout_manager.rb

anything/using_snake_case.rake

Use 2 (not 1) spaces for indentation.
Open

                hash = {}
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

Use 2 spaces for indentation in a hash, relative to the start of the line where the left curly brace is.
Open

                :site => "https://www.elitmus.com"
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
                        }

Tab detected.
Open

            # class NoAuthorizationCodeError < StandardError; en
Severity: Minor
Found in lib/omniauth/strategies/elitmus.rb by rubocop

Tab detected.
Open

                super.tap do |params|
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

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

Freeze mutable objects assigned to constants.
Open

    VERSION = "0.0.4"
Severity: Minor
Found in lib/omniauth/elitmus/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

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

  spec.homepage      = "https://github.com/elitmus/omniauth-elitmus"
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

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

Tab detected.
Open

                    #
Severity: Minor
Found in lib/omniauth/strategies/elitmus.rb by rubocop
Severity
Category
Status
Source
Language