From 7fdbd745a2c914001a2174aeadae26b9c970ffaf Mon Sep 17 00:00:00 2001 From: Geremia Taglialatela Date: Mon, 5 Jun 2023 15:53:15 +0200 Subject: Fix Style/FormatString offenses MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `Kernel#format` is faster and will avoid to allocate an array compared to `String#%`. ``` IPS: kernel_format: 3877614.2 i/s string_percent: 3531475.0 i/s - 1.10x (± 0.00) slower Memory: kernel_format: 160 allocated string_percent: 200 allocated - 1.25x more ``` --- .rubocop_todo.yml | 12 ------------ 1 file changed, 12 deletions(-) (limited to '.rubocop_todo.yml') diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 2359f950..67e59726 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -186,18 +186,6 @@ Style/ExpandPathArguments: Exclude: - 'axlsx.gemspec' -# This cop supports safe autocorrection (--autocorrect). -# Configuration parameters: EnforcedStyle. -# SupportedStyles: format, sprintf, percent -Style/FormatString: - Exclude: - - 'lib/axlsx/drawing/pic.rb' - - 'lib/axlsx/drawing/view_3D.rb' - - 'lib/axlsx/drawing/vml_drawing.rb' - - 'lib/axlsx/util/accessors.rb' - - 'lib/axlsx/util/validators.rb' - - 'lib/axlsx/workbook/worksheet/worksheet.rb' - # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: MaxUnannotatedPlaceholdersAllowed, AllowedMethods, AllowedPatterns. # SupportedStyles: annotated, template, unannotated -- cgit v1.2.3