summaryrefslogtreecommitdiffhomepage
path: root/.rubocop_todo.yml
AgeCommit message (Collapse)Author
2023-10-19Merge pull request #269 from kiskoza/221-icon-set-improvementsZsolt Kozaroczy
Add optional interpolation points to icon sets
2023-10-19Merge pull request #273 from tagliala/chore/fix-unused-block-argumentZsolt Kozaroczy
Fix Lint/UnusedBlockArgument offenses
2023-10-19Add optional interpolation points to icon setsKoza
2023-10-19Merge pull request #197 from tagliala/security/opt-in-for-mfa-requirementZsolt Kozaroczy
Opt-in for MFA requirement
2023-07-13Fix Style/AccessorGrouping offenseGeremia Taglialatela
Provide documentation to two attribute readers which triggered the offense.
2023-07-05Fix offenses in sheet protectionGeremia Taglialatela
- Lint/AmbiguousOperatorPrecedence - Style/PerlBackrefs - Style/StringChars - Style/UnpackFirst
2023-07-04Merge pull request #288 from tagliala/chore/fix-non-local-exit-from-iteratorZsolt Kozaroczy
Fix Lint/NonLocalExitFromIterator offense
2023-07-01Fix Style/PreferredHashMethods offenseGeremia Taglialatela
`Gem.loaded_specs` is a hash, so it is safe to use `key?` and enable this cop
2023-07-01Fix Lint/NonLocalExitFromIterator offenseGeremia Taglialatela
Uses `Array#any?` instead of `Array#each`. According to benchmarks, `any?` is slightly faster when validation fails (3%) and noticeably faster when validation passes (up to 60%)
2023-06-27Merge pull request #285 from tagliala/chore/fix-redundant-self-offensesZsolt Kozaroczy
Fix redundant self offenses
2023-06-15Fix redundant self offensesGeremia Taglialatela
No performance gain, this can be seen as a cosmetic change to have shorter lines
2023-06-15Fix Lint/UnusedBlockArgument offensesGeremia Taglialatela
Use `each_value` instead of `each` where possible. The performance gain is minimal (3%). ``` Comparison: each_value: 4105733.4 i/s each: 3998011.4 i/s - 1.03x (± 0.00) slower ```
2023-06-14Enable Naming/PredicateName copGeremia Taglialatela
Renaming the existing methods would break the public API, and it is not worth to alias and/or deprecate existing methods, so this commit enables Naming/PredicateName and allows the existing methods to preserve their name
2023-06-13Fix safe Style/Lambda offensesGeremia Taglialatela
- Use literal syntax on single line - Use lambda method on multiple lines Ref: https://rubystyle.guide/#lambda-multi-line
2023-06-10Fix safe Style/ColonMethodCall offensesGeremia Taglialatela
Caxlsx is using both `.` and `::`, 220 occurrences vs 280 to invoke methods on `Axlsx` module. This commit standardizes the approach towards `.`, which will also allow shorter lines. Performance is not affected ``` Comparison: Axlsx.validate: 8515252.3 i/s Axlsx::validate: 8512863.7 i/s - same-ish: difference falls within error ```
2023-06-09Refactor random char generationGeremia Taglialatela
Fix the following safe offenses: - Style/OperatorMethodCall - Style/RandomWithOffset And use Array.new to avoid an extra allocation: ``` Comparison (IPS): Array.new(8) { rand(65..89).chr }.join: 492433.7 i/s (0...8).map { 65.+(rand(25)).chr }.join: 432155.8 i/s - 1.14x (± 0.00) slower Comparison (Memory): Array.new(8) { rand(65..89).chr }.join: 440 allocated (0...8).map { 65.+(rand(25)).chr }.join: 560 allocated - 1.27x more ```
2023-06-05Fix Style/RedundantInterpolation offensesGeremia Taglialatela
`%` is an operation on `String` that will return a new `String`, so the interpolation is redundant Also adds a missing spec on PivotTable#rels_pn ``` IPS: uninterpolated: 4045715.7 i/s interpolated: 2359775.6 i/s - 1.71x (± 0.00) slower Memory: uninterpolated: 160 allocated interpolated: 232 allocated - 1.45x more ```
2023-06-05Fix Style/FormatString offensesGeremia Taglialatela
`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 ```
2023-06-05Merge pull request #274 from tagliala/chore/fix-negated-if-offensesZsolt Kozaroczy
Fix negated if offenses
2023-06-02Fix negated if offensesGeremia Taglialatela
Should also provide a negligible performance improvement, about 3% on Ruby 3.2 and 6% on Ruby 2.6 (M1 Pro)
2023-05-31Remove redundant parenthesesGeremia Taglialatela
- Style/ParenthesesAroundCondition - Style/RedundantParentheses - Style/TernaryParentheses `Style/ParenthesesAroundCondition` may be questionable, but a majority of comparison where not using parentheses, so offenses have been fixed for uniformity across the codebase
2023-05-31Merge pull request #268 from tagliala/chore/fix-symbol-proc-offensesZsolt Kozaroczy
Fix Style/SymbolProc offenses
2023-05-31Merge pull request #267 from tagliala/chore/freeze-mutable-constantsZsolt Kozaroczy
Fix Style/MutableConstant offenses
2023-05-31Merge pull request #266 from tagliala/chore/fix-yoda-condition-offenseZsolt Kozaroczy
Fix Style/YodaCondition offense
2023-05-31Merge pull request #265 from tagliala/chore/fix-conditional-assignment-offensesZsolt Kozaroczy
Fix Style/ConditionalAssignment offenses
2023-05-31Fix Style/SymbolProc offensesGeremia Taglialatela
This also provides a performance improvement ``` Comparison (array of 4 elements): map(&): 3643131.4 i/s map {}: 3488052.5 i/s - 1.04x (± 0.00) slower Comparison (array of 20 elements): map(&): 466013.9 i/s map {}: 408447.2 i/s - 1.14x (± 0.00) slower ```
2023-05-31Fix Style/MutableConstant offensesGeremia Taglialatela
2023-05-31Fix Style/YodaCondition offenseGeremia Taglialatela
2023-05-31Fix Style/ConditionalAssignment offensesGeremia Taglialatela
2023-05-31Merge pull request #249 from tagliala/chore/use-each-keyZsolt Kozaroczy
Fix Style/HashEachMethods offense
2023-05-31Fix string concatenation offenses in production codeGeremia Taglialatela
2023-05-31Merge pull request #262 from tagliala/chore/fix-if-inside-else-offenseZsolt Kozaroczy
Fix Style/IfInsideElse offense
2023-05-31Merge pull request #261 from ↵Zsolt Kozaroczy
tagliala/chore/fix-string-concatenation-in-non-production-code Fix StringConcatenation offenses (non-production)
2023-05-31Merge pull request #260 from ↵Zsolt Kozaroczy
tagliala/chore/fix-redundant-file-extension-in-require-offenses Fix Style/RedundantFileExtensionInRequire offenses
2023-05-31Merge pull request #259 from tagliala/chore/enable-naming-copsZsolt Kozaroczy
Enable Naming cops
2023-05-26Fix Style/HashEachMethods offenseGeremia Taglialatela
Replace `keys.each` with hash iteration ```rb MY_HASH = { first: '1', second: '2', third: '3' } %i[ips memory].each do |benchmark| Benchmark.send(benchmark) do |x| x.report("each_key") { MY_HASH.each_key { |k| MY_HASH[k] } } x.report("keys.each") { MY_HASH.keys.each { |k| MY_HASH[k] } } x.report("each") { MY_HASH.each { |k, v| v } } x.compare! end end ``` ``` IPS Comparison: each: 4283031.6 i/s each_key: 3683407.4 i/s - 1.16x (± 0.00) slower keys.each: 3387425.1 i/s - 1.26x (± 0.00) slower Memory Comparison: each_key: 0 allocated each: 0 allocated - same keys.each: 40 allocated - Infx more ```
2023-05-25Enable Naming copsGeremia Taglialatela
Also fix safe minor offenses - Naming/BinaryOperatorParameterName - Naming/HeredocDelimiterCase
2023-05-25Fix StringConcatenation offenses (non-production)Geremia Taglialatela
Prefer interpolation over concatenation ``` Comparison ("String#{'String'}" vs 'String' + 'String'): interpolation: 11821321.0 i/s concatenation: 8849491.7 i/s - 1.34x (± 0.00) slower ```
2023-05-25Opt-in for MFA requirementGeremia Taglialatela
Make the gem more secure by requiring that all privileged operations by any of the owners require OTP. Ref: https://guides.rubygems.org/mfa-requirement-opt-in/
2023-05-25Remove duplicate checkGeremia Taglialatela
Axlsx::Row is now an Array, so it is possible to remove the extra duplicate branch
2023-05-25Merge pull request #258 from tagliala/chore/enable-gemspec-copsZsolt Kozaroczy
Enable Gemspec cops
2023-05-24Fix Style/IfInsideElse offenseGeremia Taglialatela
2023-05-24Fix Style/RedundantFileExtensionInRequire offensesGeremia Taglialatela
2023-05-24Do not use collection literal in loopsGeremia Taglialatela
Also refactors Page margins to avoid code duplication
2023-05-24Enable Gemspec copsGeremia Taglialatela
Gemspec/RequireMFA will be fixed via #197
2023-05-24Merge pull request #254 from tagliala/chore/performance-redundant-block-callZsolt Kozaroczy
Fix Performance/RedundantBlockCall offense
2023-05-24Merge pull request #253 from tagliala/chore/fix-line-end-concatenation-offensesZsolt Kozaroczy
Fix Style/LineEndConcatenation offenses
2023-05-24Merge pull request #251 from ↵Zsolt Kozaroczy
tagliala/chore/use-ruby-19-hash-syntax-non-production Use Ruby 1.9 hash syntax (non-production code)
2023-05-24Merge pull request #250 from tagliala/chore/fix-style-non-nil-check-offensesZsolt Kozaroczy
Fix Style/NonNilCheck offenses
2023-05-23Fix Performance/RedundantBlockCall offenseGeremia Taglialatela
Ref: https://github.com/fastruby/fast-ruby#proccall-and-block-arguments-vs-yieldcode