summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
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 #252 from tagliala/security/enable-security-copsZsolt Kozaroczy
Enable Security cops
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-24Merge pull request #248 from tagliala/chore/fix-class-check-offensesZsolt Kozaroczy
Fix safe class comparison offenses
2023-05-23Add benchmark with merge cellsPaul Kmiec
This is an extreme case, but it really shows the impact of merging cells.
2023-05-23Improve Regexp validatorGeremia Taglialatela
Replace `.match` with `.match?`
2023-05-23Improve cell type from value implementationGeremia Taglialatela
- Use `Regexp.match?` instead of `=~` when match is not needed - Use `Regexp.match` instead of `string.match` for uniformity ``` match?: 7335121.2 i/s =~: 2329358.3 i/s - 3.15x (± 0.00) slower ```
2023-05-23Fix profiler deprecationsGeremia Taglialatela
``` NOTE: RubyProf.profile is deprecated; use Profile.profile instead. It will be removed on or after 2023-06. RubyProf.profile called from ./test/profile.rb:14. NOTE: RubyProf.running? is deprecated; use Profile#running? instead. It will be removed on or after 2023-06. NOTE: RubyProf.measure_mode is deprecated; use Profile#measure_mode instead. It will be removed on or after 2023-06. NOTE: RubyProf.exclude_threads is deprecated; use Profile#exclude_threads instead. It will be removed on or after 2023-06. ```
2023-05-22Use #== and #eql? from BasicObjectPaul Kmiec
Prior to https://github.com/caxlsx/caxlsx/pull/223, SimpleTypeList was just an object and inheritied #== / #eql? from BasicObject. These versions are fast as they just compare whether two objects sit in the same memory location. After https://github.com/caxlsx/caxlsx/pull/223, we started to inherit #== / #eql? from Array. These are slow as they crawl all the elements in the Array. This commit restores the original version of #== / #eql?.
2023-05-23Fix Performance/RedundantBlockCall offenseGeremia Taglialatela
Ref: https://github.com/fastruby/fast-ruby#proccall-and-block-arguments-vs-yieldcode
2023-05-23Fix Style/LineEndConcatenation offensesGeremia Taglialatela
2023-05-23Enable Security copsGeremia Taglialatela
Also fixes a Security/Open offense that couldn't be exploited, because the only invocation of `get_mime_type_from_uri` was validating the input with a `URI::DEFAULT_PARSER` regexp
2023-05-22Use Ruby 1.9 hash syntax (non-production code)Geremia Taglialatela
2023-05-22Fix Style/NonNilCheck offensesGeremia Taglialatela
There were 8 occurrences of `!nil?` and 4 of `!= nil`. This change will standardize the usage of non-nil checks
2023-05-22Fix safe class comparison offensesGeremia Taglialatela
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 ```
2023-05-22Merge pull request #236 from pkmiec/smallPerfTweaksZsolt Kozaroczy
Add `Cell#style_str` so that we can directly return '0'
2023-05-22Merge pull request #246 from tagliala/chore/fix-useless-assignment-offensesZsolt Kozaroczy
Fix Lint/UselessAssignment offenses
2023-05-22Merge pull request #245 from tagliala/chore/test-against-jruby-headZsolt Kozaroczy
Test against JRuby head
2023-05-22Merge pull request #244 from tagliala/chore/remove-ruby-pre-25-codeZsolt Kozaroczy
Remove check needed for Ruby < 2.5
2023-05-22Merge pull request #243 from tagliala/chore/fix-zero-length-predicate-offensesZsolt Kozaroczy
Fix Style/ZeroLengthPredicate unsafe offenses
2023-05-22Merge pull request #242 from tagliala/chore/fix-minor-safe-offensesZsolt Kozaroczy
Remove minor safe offenses
2023-05-22Merge pull request #241 from tagliala/chore/fix-style-and-or-offenseZsolt Kozaroczy
Fix Style/AndOr offenses
2023-05-22Merge pull request #240 from tagliala/chore/fix-void-contextsZsolt Kozaroczy
Fix Lint/Void offenses
2023-05-22Merge pull request #237 from tagliala/chore/fix-hash-transform-keysZsolt Kozaroczy
Fix hash transformation related offenses
2023-05-22Merge pull request #235 from tagliala/chore/fix-yard-warningsZsolt Kozaroczy
Fix YARD warnings
2023-05-22Merge pull request #239 from adamkiczula/bug/fix-sheet-by-name-encodingZsolt Kozaroczy
Fix sheet_by_name for sheets with escaped characters
2023-05-21Improve commentsGeremia Taglialatela
- Use https where possible - Capitalize Excel
2023-05-21Fix Lint/UselessAssignment offensesGeremia Taglialatela
2023-05-20Test against JRuby headGeremia Taglialatela
Also provide a better user message in workflow results when failures are allowed ("allow failures" instead of "true")
2023-05-20Remove check needed for Ruby < 2.5Geremia Taglialatela
Ref: #202
2023-05-20Fix Style/ZeroLengthPredicate unsafe offensesGeremia Taglialatela
2023-05-20Remove minor safe offensesGeremia Taglialatela
- Style/RaiseArgs - Style/RedundantCondition - Style/RedundantReturn - Style/SelfAssignment - Style/SoleNestedConditional
2023-05-20Fix Style/AndOr offensesGeremia Taglialatela
From Ruby Style Guide: > Do not use `and` and `or` in boolean context - and and or are control flow operators and should be used as such. They have very low precedence, and can be used as a short form of specifying flow sequences like "evaluate expression 1, and only if it is not successful (returned `nil`), evaluate expression 2". This is especially useful for raising errors or early return without breaking the reading flow. Also: - Remove redundant use of self - Use attribute reader instead of accessing instance variable
2023-05-20Fix Lint/Void offensesGeremia Taglialatela
Setter methods return the assigned value. Given: ```rb class MyClass def foo=(v) v = 10 42 end end ``` `my_object.foo = 5` will always return `5` This methods removes code that does not have effect
2023-05-20Fix sheet_by_name for sheets with escaped charactersAdam Kiczula
2023-05-19Fix hash transformation related offensesGeremia Taglialatela
- Style/HashConversion - Style/HashTransformKeys ``` Comparison (IPS): transform_keys: 2890030.0 i/s Hash[map]: 1777641.0 i/s - 1.63x (± 0.00) slower Comparison (Memory): transform_keys: 168 allocated Hash[map]: 248 allocated - 1.48x more ```
2023-05-18Fix YARD warningsGeremia Taglialatela
- `should_use_same_id_as?` has been replaced by `ids_cache_key` in 913003e Also fixes a typo [ci skip]
2023-05-17Add `Cell#style_str` so that we can directly return '0'Paul Kmiec
2023-05-17Merge pull request #233 from tagliala/chore/fix-safe-performance-offensesZsolt Kozaroczy
Fix safe performance RuboCop offenses
2023-05-17Fix safe performance RuboCop offenses Geremia Taglialatela
- Fix Performance/RedundantMatch and Performance/RegexpMatch - Fix Performance/RedundantSplitRegexpArgument
2023-05-17Merge pull request #232 from tagliala/chore/regenerate-rubocop-todoZsolt Kozaroczy
Regenerate RuboCop Todo
2023-05-17Regenerate RuboCop TodoGeremia Taglialatela
2023-05-17Merge pull request #230 from pkmiec/serializedAttributesZsolt Kozaroczy
Serialized attributes
2023-05-17Merge branch 'master' into serializedAttributesZsolt Kozaroczy
2023-05-17Merge pull request #231 from tagliala/chore/use-delete-prefix-suffixZsolt Kozaroczy
Replace `sub` with `delete_prefix`/`delete_suffix`
2023-05-17Merge branch 'master' into chore/use-delete-prefix-suffixZsolt Kozaroczy
2023-05-17Merge pull request #229 from tagliala/chore/use-detect-and-includeZsolt Kozaroczy
Use `include?` and `find` for performance
2023-05-17Merge branch 'master' into chore/use-detect-and-includeZsolt Kozaroczy