| Age | Commit message (Collapse) | Author |
|
Fix Performance/RedundantBlockCall offense
|
|
Fix Style/LineEndConcatenation offenses
|
|
Enable Security cops
|
|
tagliala/chore/use-ruby-19-hash-syntax-non-production
Use Ruby 1.9 hash syntax (non-production code)
|
|
Fix Style/NonNilCheck offenses
|
|
Fix safe class comparison offenses
|
|
This is an extreme case, but it really shows the impact of merging cells.
|
|
Replace `.match` with `.match?`
|
|
- 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
```
|
|
```
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.
```
|
|
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?.
|
|
Ref: https://github.com/fastruby/fast-ruby#proccall-and-block-arguments-vs-yieldcode
|
|
|
|
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
|
|
|
|
There were 8 occurrences of `!nil?` and 4 of `!= nil`. This change will
standardize the usage of non-nil checks
|
|
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
```
|
|
Add `Cell#style_str` so that we can directly return '0'
|
|
Fix Lint/UselessAssignment offenses
|
|
Test against JRuby head
|
|
Remove check needed for Ruby < 2.5
|
|
Fix Style/ZeroLengthPredicate unsafe offenses
|
|
Remove minor safe offenses
|
|
Fix Style/AndOr offenses
|
|
Fix Lint/Void offenses
|
|
Fix hash transformation related offenses
|
|
Fix YARD warnings
|
|
Fix sheet_by_name for sheets with escaped characters
|
|
- Use https where possible
- Capitalize Excel
|
|
|
|
Also provide a better user message in workflow results when failures
are allowed ("allow failures" instead of "true")
|
|
Ref: #202
|
|
|
|
- Style/RaiseArgs
- Style/RedundantCondition
- Style/RedundantReturn
- Style/SelfAssignment
- Style/SoleNestedConditional
|
|
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
|
|
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
|
|
|
|
- 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
```
|
|
- `should_use_same_id_as?` has been replaced by `ids_cache_key` in 913003e
Also fixes a typo
[ci skip]
|
|
|
|
Fix safe performance RuboCop offenses
|
|
- Fix Performance/RedundantMatch and Performance/RegexpMatch
- Fix Performance/RedundantSplitRegexpArgument
|
|
Regenerate RuboCop Todo
|
|
|
|
Serialized attributes
|
|
|
|
Replace `sub` with `delete_prefix`/`delete_suffix`
|
|
|
|
Use `include?` and `find` for performance
|
|
|