Skip to content
This repository has been archived by the owner on Jun 27, 2019. It is now read-only.

2370-1 #134

Open
wants to merge 73 commits into
base: master
Choose a base branch
from
Open

2370-1 #134

wants to merge 73 commits into from

Conversation

AntonNaumchik
Copy link
Contributor

@AntonNaumchik AntonNaumchik commented Jul 10, 2018

Номер

2370

Номер задания

1

Ссылка на видео с демо

  1. https://youtu.be/fzdkpzHWpfM (rubocop+reek)
  2. https://youtu.be/5bSxhKikYf0 (rake)

Комментарии

# Koans.
end

# ------------------------------------------------------------------

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Layout/CommentIndentation: Incorrect indentation detected (column 3 instead of 2).

mc = MessageCatcher.new

assert mc.send('caught?')
assert mc.send('caught' '?') # What do you need to add to the first string?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lint/ImplicitStringConcatenation: Combine 'caught' and '?' into a single string literal, rather than using implicit string concatenation. Or, if they were intended to be separate method arguments, separate them with a comma.
Layout/ExtraSpacing: Unnecessary spacing detected.

last_name = "Rob"
first_name, last_name = last_name, first_name
assert_equal "Rob", first_name
assert_equal "Roy", last_name

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

first_name = "Roy"
last_name = "Rob"
first_name, last_name = last_name, first_name
assert_equal "Rob", first_name

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.


def test_swapping_with_parallel_assignment
first_name = "Roy"
last_name = "Rob"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.


def test_parallel_assignments_with_too_few_variables
first_name, last_name = ["Cher"]
assert_equal "Cher", first_name

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

end

def test_parallel_assignments_with_too_few_variables
first_name, last_name = ["Cher"]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

def test_parallel_assignments_with_splat_operator
first_name, *last_name = ["John", "Smith", "III"]
assert_equal "John", first_name
assert_equal ["Smith", "III"], last_name

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/WordArray: Use %w or %W for an array of words.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.


def test_parallel_assignments_with_splat_operator
first_name, *last_name = ["John", "Smith", "III"]
assert_equal "John", first_name

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

end

def test_parallel_assignments_with_splat_operator
first_name, *last_name = ["John", "Smith", "III"]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/WordArray: Use %w or %W for an array of words.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

@@ -0,0 +1,53 @@
require File.expand_path(File.dirname(__FILE__) + '/neo')

class AboutArrayAssignment < Neo::Koan

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/Documentation: Missing top-level class documentation comment.

@AntonNaumchik
Copy link
Contributor Author

@anatoliliotych Could you please help me with this 1 violation found error? HoundCI does not comment anything regarding it.

@anatoliliotych
Copy link
Member

run it locally with docker from Lomov.

@anatoliliotych anatoliliotych force-pushed the master branch 2 times, most recently from 661e292 to c7d1461 Compare July 10, 2018 21:16
# ------------------------------------------------------------------
# Comment
class WellBehavedFooCatcher
# rubocop:disable Style/MethodMissing

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Layout/CommentIndentation: Incorrect indentation detected (column 2 instead of 4).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.