-
Notifications
You must be signed in to change notification settings - Fork 43
2213-1 #161
base: master
Are you sure you want to change the base?
2213-1 #161
Conversation
2213/1/triangle.rb
Outdated
# | ||
# This method smells of :reek:UtilityFunction | ||
# This method smells of :reek:FeatureEnvy | ||
def triangle(side_a, side_b, side_c) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure how this can pass koans if you don't raise triangle_error in this method
2213/1/about_dice_project.rb
Outdated
attr_reader :values | ||
|
||
def roll(count) | ||
@values = (0...count).map { rand(1..6) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try to initialize array with number and pass a block
2213/1/about_symbols.rb
Outdated
# This method smells of :reek:TooManyStatements | ||
# This method smells of :reek:FeatureEnvy | ||
def test_constants_become_symbols | ||
all_symbols_as_strings = Symbol.all_symbols.map{&:to_s} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/Syntax: unexpected token tAMPER
2213/1/about_symbols.rb
Outdated
# This method smells of :reek:TooManyStatements | ||
# This method smells of :reek:FeatureEnvy | ||
def test_method_names_become_symbols | ||
symbols_as_strings = Symbol.all_symbols.map{&:to_s} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/Syntax: unexpected token tAMPER
2213/1/about_scoring_project.rb
Outdated
assert_equal 1150, score([1, 1, 1, 5, 1]) | ||
end | ||
end | ||
# rubocop:disable Lint/Syntax |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/UnneededCopDisableDirective: Unnecessary disabling of Lint/Syntax.
2213/1/about_scoring_project.rb
Outdated
end | ||
|
||
# This class smells of :reek:UncommunicativeModuleName | ||
class AboutScoringProject < Neo::Koan |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/Syntax: class definition in method body
2213/1/triangle.rb
Outdated
# This method smells of :reek:FeatureEnvy | ||
def triangle(side_a, side_b, side_c) | ||
# WRITE THIS CODE | ||
triangle_error(side_a,side_b,side_c) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/SpaceAfterComma: Space missing after comma.
# makes some assertions about it. | ||
|
||
nil.some_method_nil_doesnt_know_about | ||
rescue Exception => ex |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/RescueException: Avoid rescuing the Exception class. Perhaps you meant to rescue StandardError?
2213/1/about_hashes.rb
Outdated
assert_equal 'dos', hash2[:two] | ||
end | ||
|
||
# rubocop:disable Metrics/AbcSize |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/UnneededCopDisableDirective: Unnecessary disabling of Metrics/AbcSize.
2213/1/about_hashes.rb
Outdated
# This method smells of :reek:TooManyStatements | ||
# This method smells of :reek:FeatureEnvy | ||
def test_hash_keys | ||
hash = { one: => 'uno', two: => 'dos' } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/Syntax: unexpected token tASSOC
2213/1/about_hashes.rb
Outdated
# This method smells of :reek:FeatureEnvy | ||
def test_hash_is_unordered | ||
hash1 = { one: => 'uno', two: => 'dos' } | ||
hash2 = { two: => 'dos', one: => 'uno' } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/Syntax: unexpected token tASSOC
2213/1/about_hashes.rb
Outdated
# This method smells of :reek:TooManyStatements | ||
# This method smells of :reek:FeatureEnvy | ||
def test_hash_is_unordered | ||
hash1 = { one: => 'uno', two: => 'dos' } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/Syntax: unexpected token tASSOC
2213/1/about_hashes.rb
Outdated
def test_changing_hashes | ||
hash = { one: => 'uno', two: => 'dos' } | ||
hash[:one] = 'eins' | ||
expected = { one: => 'eins', two: => 'dos' } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/Syntax: unexpected token tASSOC
2213/1/about_hashes.rb
Outdated
# This method smells of :reek:TooManyStatements | ||
# This method smells of :reek:FeatureEnvy | ||
def test_changing_hashes | ||
hash = { one: => 'uno', two: => 'dos' } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/Syntax: unexpected token tASSOC
2213/1/about_hashes.rb
Outdated
# This method smells of :reek:TooManyStatements | ||
# This method smells of :reek:FeatureEnvy | ||
def test_accessing_hashes_with_fetch | ||
hash = { one: => 'uno' } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/Syntax: unexpected token tASSOC
2213/1/about_hashes.rb
Outdated
# This method smells of :reek:TooManyStatements | ||
# This method smells of :reek:FeatureEnvy | ||
def test_accessing_hashes | ||
hash = { one: => 'uno', two: => 'dos' } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/Syntax: unexpected token tASSOC
2213/1/about_hashes.rb
Outdated
# This method smells of :reek:TooManyStatements | ||
# This method smells of :reek:FeatureEnvy | ||
def test_hash_literals | ||
hash = { one: => 'uno', two: => 'dos' } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/Syntax: unexpected token tASSOC
2213/1/about_hashes.rb
Outdated
def test_changing_hashes | ||
hash = { one: => 'uno', two: => 'dos' } | ||
hash[:one] = 'eins' | ||
expected = { one: => 'eins', two: => 'dos' } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/Syntax: unexpected token tASSOC
2213/1/about_hashes.rb
Outdated
# This method smells of :reek:TooManyStatements | ||
# This method smells of :reek:FeatureEnvy | ||
def test_changing_hashes | ||
hash = { one: => 'uno', two: => 'dos' } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/Syntax: unexpected token tASSOC
2213/1/about_hashes.rb
Outdated
# This method smells of :reek:TooManyStatements | ||
# This method smells of :reek:FeatureEnvy | ||
def test_accessing_hashes_with_fetch | ||
hash = { one: => 'uno' } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/Syntax: unexpected token tASSOC
2213/1/about_hashes.rb
Outdated
# This method smells of :reek:TooManyStatements | ||
# This method smells of :reek:FeatureEnvy | ||
def test_accessing_hashes | ||
hash = { one: => 'uno', two: => 'dos' } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/Syntax: unexpected token tASSOC
2213/1/about_hashes.rb
Outdated
# This method smells of :reek:TooManyStatements | ||
# This method smells of :reek:FeatureEnvy | ||
def test_hash_literals | ||
hash = { one: => 'uno', two: => 'dos' } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/Syntax: unexpected token tASSOC
@@ -0,0 +1,231 @@ | |||
require File.expand_path(File.dirname(__FILE__) + '/neo') | |||
|
|||
# rubocop:disable Style/MethodMissingSuper |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/UnneededCopDisableDirective: Unnecessary disabling of Style/MethodMissingSuper (did you mean Style/SingleLineMethods?).
2213/1/about_message_passing.rb
Outdated
# ------------------------------------------------------------------ | ||
|
||
class WellBehavedFooCatcher | ||
def method_missing(method_name, *args, &block) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/MethodMissing: When using method_missing, define respond_to_missing? and fall back on super.
2213/1/about_message_passing.rb
Outdated
|
||
class AllMessageCatcher | ||
# This method smells of :reek:UtilityFunction | ||
def method_missing(method_name, *args) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/MethodMissing: When using method_missing, define respond_to_missing? and fall back on super.
require File.expand_path(File.dirname(__FILE__) + '/neo') | ||
|
||
# rubocop:disable Style/MissingRespondToMissing | ||
# rubocop:disable Style/MethodMissingSuper |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/UnneededCopDisableDirective: Unnecessary disabling of Style/MethodMissingSuper (did you mean Style/SingleLineMethods?).
@@ -0,0 +1,242 @@ | |||
require File.expand_path(File.dirname(__FILE__) + '/neo') | |||
|
|||
# rubocop:disable Style/MissingRespondToMissing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/UnneededCopDisableDirective: Unnecessary disabling of Style/MissingRespondToMissing (unknown cop).
end | ||
|
||
counts.each do |item, num_found| | ||
if item == 1 && num_found >= 3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FeatureEnvy: score refers to 'num_found' more than self (maybe move it to another class?). More info.
# ------------------------------------------------------------------ | ||
# This method smells of :reek:TooManyStatements | ||
class WellBehavedFooCatcher | ||
def method_missing(method_name, *args, &block) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/MethodMissing: When using method_missing, define respond_to_missing? and fall back on super.
# This method smells of :reek:TooManyStatements | ||
class AllMessageCatcher | ||
# This method smells of :reek:UtilityFunction | ||
def method_missing(method_name, *args) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/MethodMissing: When using method_missing, define respond_to_missing? and fall back on super.
fix the hound errors. |
Номер
2213
Номер задания
1
Ссылка на видео с демо
https://www.youtube.com/watch?v=LnYo0S268tg
Комментарии
Все коаны выполнил, проверил локально, пытаюсь накормить собаку