TheCorrespondingSquares/chess-app

View on GitHub

Showing 927 of 927 total issues

Line is too long. [90/80]
Open

    let(:valid_moves) { [[1, 3], [1, 5], [2, 2], [2, 6], [4, 2], [4, 6], [5, 3], [5, 5]] }
Severity: Minor
Found in spec/models/piece_spec.rb by rubocop

Line is too long. [85/80]
Open

    context 'when your pawn and adjacent opponent pawn are in the middle of board' do
Severity: Minor
Found in spec/models/pawn_spec.rb by rubocop

Space missing inside }.
Open

      let!(:pawn2) {FactoryGirl.create(:pawn, color: "White", x_pos: 2, y_pos: 4, game_id: game.id, turn: 2)}
Severity: Minor
Found in spec/models/pawn_spec.rb by rubocop

Checks that block braces have or don't have surrounding space inside them on configuration. For blocks taking parameters, it checks that the left brace has or doesn't have trailing space depending on configuration.

Example: EnforcedStyle: space (default)

# The `space` style enforces that block braces have
# surrounding space.

# bad
some_array.each {puts e}

# good
some_array.each { puts e }

Example: EnforcedStyle: no_space

# The `no_space` style enforces that block braces don't
# have surrounding space.

# bad
some_array.each { puts e }

# good
some_array.each {puts e}

Example: EnforcedStyleForEmptyBraces: no_space (default)

# The `no_space` EnforcedStyleForEmptyBraces style enforces that
# block braces don't have a space in between when empty.

# bad
some_array.each {   }
some_array.each {  }
some_array.each { }

# good
some_array.each {}

Example: EnforcedStyleForEmptyBraces: space

# The `space` EnforcedStyleForEmptyBraces style enforces that
# block braces have at least a spece in between when empty.

# bad
some_array.each {}

# good
some_array.each { }
some_array.each {  }
some_array.each {   }

Example: SpaceBeforeBlockParameters: true (default)

# The SpaceBeforeBlockParameters style set to `true` enforces that
# there is a space between `{` and `|`. Overrides `EnforcedStyle`
# if there is a conflict.

# bad
[1, 2, 3].each {|n| n * 2 }

# good
[1, 2, 3].each { |n| n * 2 }

Example: SpaceBeforeBlockParameters: true

# The SpaceBeforeBlockParameters style set to `false` enforces that
# there is no space between `{` and `|`. Overrides `EnforcedStyle`
# if there is a conflict.

# bad
[1, 2, 3].each { |n| n * 2 }

# good
[1, 2, 3].each {|n| n * 2 }

Line is too long. [99/80]
Open

      let!(:pawn) {FactoryGirl.create(:pawn, color: "Black", x_pos: 3, y_pos: 4, game_id: game.id)}
Severity: Minor
Found in spec/models/pawn_spec.rb by rubocop

Line is too long. [100/80]
Open

        black_pawn = FactoryGirl.create(:pawn, color: "Black", x_pos: 3, y_pos: 3, game_id: game.id)
Severity: Minor
Found in spec/models/pawn_spec.rb by rubocop

Line is too long. [109/80]
Open

      let!(:pawn2) {FactoryGirl.create(:pawn, color: "White", x_pos: 2, y_pos: 3, game_id: game.id, turn: 1)}
Severity: Minor
Found in spec/models/pawn_spec.rb by rubocop

Line is too long. [104/80]
Open

        let!(:pawn2) { FactoryGirl.create(:pawn, color: "White", x_pos: 3, y_pos: 3, game_id: game.id) }
Severity: Minor
Found in spec/models/pawn_spec.rb by rubocop

Line is too long. [103/80]
Open

      FactoryGirl.create(:rook, color: "White", x_pos: 7, y_pos: 4, game_id: game_stalemate.id)        
Severity: Minor
Found in spec/models/game_spec.rb by rubocop

Extra empty line detected at block body beginning.
Open


    context "for a move that leaves your King in check" do
Severity: Minor
Found in spec/models/piece_spec.rb by rubocop

This cops checks if empty lines around the bodies of blocks match the configuration.

Example: EnforcedStyle: empty_lines

# good

foo do |bar|

  # ...

end

Example: EnforcedStyle: noemptylines (default)

# good

foo do |bar|
  # ...
end

Trailing whitespace detected.
Open

    
Severity: Minor
Found in spec/models/pawn_spec.rb by rubocop

Trailing whitespace detected.
Open

    
Severity: Minor
Found in spec/models/pawn_spec.rb by rubocop

Line is too long. [109/80]
Open

      let!(:pawn2) {FactoryGirl.create(:pawn, color: "White", x_pos: 1, y_pos: 3, game_id: game.id, turn: 1)}
Severity: Minor
Found in spec/models/pawn_spec.rb by rubocop

Line is too long. [103/80]
Open

        let!(:pawn) { FactoryGirl.create(:pawn, color: "White", x_pos: 3, y_pos: 4, game_id: game.id) }
Severity: Minor
Found in spec/models/pawn_spec.rb by rubocop

Line is too long. [134/80]
Open

      let!(:piece_making_check) { FactoryGirl.create(:bishop, color: "Black", captured: false, x_pos: 0, y_pos: 0, game_id: game.id) }
Severity: Minor
Found in spec/models/game_spec.rb by rubocop

Line is too long. [105/80]
Open

      let!(:bishop) { FactoryGirl.create(:bishop, color: "White", x_pos: 7, y_pos: 6, game_id: game.id) }
Severity: Minor
Found in spec/models/game_spec.rb by rubocop

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

      let!(:pawn) { FactoryGirl.create(:pawn, color: "White", x_pos: 7, y_pos: 6, game_id: game.id) }
Severity: Minor
Found in spec/models/game_spec.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"

Space missing inside }.
Open

    let(:knight) { FactoryGirl.create(:knight, color: "White", x_pos: 3, y_pos: 4, game_id: game.id)}
Severity: Minor
Found in spec/models/piece_spec.rb by rubocop

Checks that block braces have or don't have surrounding space inside them on configuration. For blocks taking parameters, it checks that the left brace has or doesn't have trailing space depending on configuration.

Example: EnforcedStyle: space (default)

# The `space` style enforces that block braces have
# surrounding space.

# bad
some_array.each {puts e}

# good
some_array.each { puts e }

Example: EnforcedStyle: no_space

# The `no_space` style enforces that block braces don't
# have surrounding space.

# bad
some_array.each { puts e }

# good
some_array.each {puts e}

Example: EnforcedStyleForEmptyBraces: no_space (default)

# The `no_space` EnforcedStyleForEmptyBraces style enforces that
# block braces don't have a space in between when empty.

# bad
some_array.each {   }
some_array.each {  }
some_array.each { }

# good
some_array.each {}

Example: EnforcedStyleForEmptyBraces: space

# The `space` EnforcedStyleForEmptyBraces style enforces that
# block braces have at least a spece in between when empty.

# bad
some_array.each {}

# good
some_array.each { }
some_array.each {  }
some_array.each {   }

Example: SpaceBeforeBlockParameters: true (default)

# The SpaceBeforeBlockParameters style set to `true` enforces that
# there is a space between `{` and `|`. Overrides `EnforcedStyle`
# if there is a conflict.

# bad
[1, 2, 3].each {|n| n * 2 }

# good
[1, 2, 3].each { |n| n * 2 }

Example: SpaceBeforeBlockParameters: true

# The SpaceBeforeBlockParameters style set to `false` enforces that
# there is no space between `{` and `|`. Overrides `EnforcedStyle`
# if there is a conflict.

# bad
[1, 2, 3].each { |n| n * 2 }

# good
[1, 2, 3].each {|n| n * 2 }

Line is too long. [100/80]
Open

        white_rook = FactoryGirl.create(:rook, color: "White", x_pos: 3, y_pos: 1, game_id: game.id)
Severity: Minor
Found in spec/models/piece_spec.rb by rubocop

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

    context "for a move that leaves your King in check" do
Severity: Minor
Found in spec/models/piece_spec.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

      it "should return true and leave game unchanged" do
Severity: Minor
Found in spec/models/piece_spec.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"
Severity
Category
Status
Source
Language