From 6acb8ad2ebd7e22f08571ff3367f122045279f9c Mon Sep 17 00:00:00 2001 From: Sijawusz Pur Rahnama Date: Fri, 22 Jan 2021 17:24:45 +0100 Subject: [PATCH] ChainedCallsWithNoBang -> ChainedCallWithNoBang --- ...th_no_bang_spec.cr => chained_call_with_no_bang_spec.cr} | 6 +++--- ...d_calls_with_no_bang.cr => chained_call_with_no_bang.cr} | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) rename spec/ameba/rule/performance/{chained_calls_with_no_bang_spec.cr => chained_call_with_no_bang_spec.cr} (94%) rename src/ameba/rule/performance/{chained_calls_with_no_bang.cr => chained_call_with_no_bang.cr} (96%) diff --git a/spec/ameba/rule/performance/chained_calls_with_no_bang_spec.cr b/spec/ameba/rule/performance/chained_call_with_no_bang_spec.cr similarity index 94% rename from spec/ameba/rule/performance/chained_calls_with_no_bang_spec.cr rename to spec/ameba/rule/performance/chained_call_with_no_bang_spec.cr index 4259b866..32504ce5 100644 --- a/spec/ameba/rule/performance/chained_calls_with_no_bang_spec.cr +++ b/spec/ameba/rule/performance/chained_call_with_no_bang_spec.cr @@ -1,9 +1,9 @@ require "../../../spec_helper" module Ameba::Rule::Performance - subject = ChainedCallsWithNoBang.new + subject = ChainedCallWithNoBang.new - describe ChainedCallsWithNoBang do + describe ChainedCallWithNoBang do it "passes if there is no potential performance improvements" do source = Source.new %( (1..3).select { |e| e > 1 }.sort! @@ -35,7 +35,7 @@ module Ameba::Rule::Performance source = Source.new %( [1, 2, 3].select { |e| e > 2 }.reverse ) - rule = ChainedCallsWithNoBang.new + rule = ChainedCallWithNoBang.new rule.call_names = %w(uniq) rule.catch(source).should be_valid end diff --git a/src/ameba/rule/performance/chained_calls_with_no_bang.cr b/src/ameba/rule/performance/chained_call_with_no_bang.cr similarity index 96% rename from src/ameba/rule/performance/chained_calls_with_no_bang.cr rename to src/ameba/rule/performance/chained_call_with_no_bang.cr index 4e0169f6..d7f827ae 100644 --- a/src/ameba/rule/performance/chained_calls_with_no_bang.cr +++ b/src/ameba/rule/performance/chained_call_with_no_bang.cr @@ -25,7 +25,7 @@ module Ameba::Rule::Performance # YAML configuration example: # # ``` - # Performance/ChainedCallsWithNoBang + # Performance/ChainedCallWithNoBang # Enabled: true # CallNames: # - uniq @@ -34,7 +34,7 @@ module Ameba::Rule::Performance # - shuffle # - reverse # ``` - class ChainedCallsWithNoBang < Base + class ChainedCallWithNoBang < Base properties do description "Identifies usage of chained calls not utilizing the bang method variants."