defconfig.rb:23:12: C: [Corrected] Style/BlockDelimiters: Avoid using {...} for multi-line blocks. hash.map { |k, v|
Signed-off-by: Liu Yinsi liuyinsi@163.com --- container/defconfig.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/container/defconfig.rb b/container/defconfig.rb index 026a183..320fba4 100755 --- a/container/defconfig.rb +++ b/container/defconfig.rb @@ -20,9 +20,9 @@ end
def set_local_env hash = cci_defaults - hash.map { |k, v| + hash.map do |k, v| system "export #{k}=#{v}" - } + end end
def docker_env(hash)
On Tue, Dec 01, 2020 at 11:36:28AM +0800, Liu Yinsi wrote:
defconfig.rb:23:12: C: [Corrected] Style/BlockDelimiters: Avoid using {...} for multi-line blocks. hash.map { |k, v|
Signed-off-by: Liu Yinsi liuyinsi@163.com
container/defconfig.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/container/defconfig.rb b/container/defconfig.rb index 026a183..320fba4 100755 --- a/container/defconfig.rb +++ b/container/defconfig.rb @@ -20,9 +20,9 @@ end
def set_local_env hash = cci_defaults
- hash.map { |k, v|
- hash.map do |k, v| system "export #{k}=#{v}"
- }
It would be better to just refactor into one line here:
hash.map { |k, v| system "export #{k}=#{v}" }
Thanks, Xijian