diff options
| author | Geremia Taglialatela <[email protected]> | 2023-05-22 18:10:10 +0200 |
|---|---|---|
| committer | Geremia Taglialatela <[email protected]> | 2023-05-22 18:10:10 +0200 |
| commit | 3b4fc2bfaa6563d071322de21434aeae6eff9d8a (patch) | |
| tree | 5bca4235d1be7d92f23e225e8ed59b3e9c3758ba /.rubocop_todo.yml | |
| parent | 6752225bbb8a9eec905ec02a98f1a25a309c404a (diff) | |
| download | caxlsx-3b4fc2bfaa6563d071322de21434aeae6eff9d8a.tar.gz caxlsx-3b4fc2bfaa6563d071322de21434aeae6eff9d8a.zip | |
Fix safe class comparison offenses
Fixes:
- Style/ClassCheck
- Style/ClassEqualityComparison
While `is_a?` and `kind_of?` are equivalent, there is a 5% gain
when switching from class comparison to `intance_of?`
```
Comparison:
instance_of: 16902635.9 i/s
class comparison: 16061288.3 i/s - 1.05x (± 0.00) slower
```
Diffstat (limited to '.rubocop_todo.yml')
| -rw-r--r-- | .rubocop_todo.yml | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 1de00edb..c1d2a7d8 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -77,11 +77,6 @@ Lint/UnusedMethodArgument: - 'lib/axlsx/package.rb' - 'lib/axlsx/util/validators.rb' -Lint/UselessAssignment: - Exclude: - - 'lib/axlsx/workbook/worksheet/header_footer.rb' - - 'lib/axlsx/workbook/worksheet/sheet_protection.rb' - # Configuration parameters: MinSize. Performance/CollectionLiteralInLoop: Exclude: @@ -112,22 +107,6 @@ Style/CaseLikeIf: Exclude: - 'lib/axlsx/workbook/worksheet/merged_cells.rb' -# This cop supports safe autocorrection (--autocorrect). -# Configuration parameters: EnforcedStyle. -# SupportedStyles: is_a?, kind_of? -Style/ClassCheck: - Exclude: - - 'lib/axlsx/drawing/axes.rb' - -# This cop supports safe autocorrection (--autocorrect). -# Configuration parameters: AllowedMethods, AllowedPatterns. -# AllowedMethods: ==, equal?, eql? -Style/ClassEqualityComparison: - Exclude: - - 'lib/axlsx/workbook/worksheet/pane.rb' - - 'lib/axlsx/workbook/worksheet/selection.rb' - - 'lib/axlsx/workbook/worksheet/sheet_view.rb' - Style/ClassVars: Exclude: - 'lib/axlsx.rb' |
