seanhandley/h3_ruby

View on GitHub

Showing 2 of 2 total issues

Line is too long. [102/100]
Open

      attach_function :max_uncompact_size, :maxUncompactSize, [H3IndexesIn, :size_t, Resolution], :int
Severity: Minor
Found in lib/h3/bindings/private.rb by rubocop

Use delete instead of gsub.
Open

        stripped_name = name.to_s.gsub("?", "")
Severity: Minor
Found in lib/h3/bindings/base.rb by rubocop

This cop identifies places where gsub can be replaced by tr or delete.

Example:

# bad
'abc'.gsub('b', 'd')
'abc'.gsub('a', '')
'abc'.gsub(/a/, 'd')
'abc'.gsub!('a', 'd')

# good
'abc'.gsub(/.*/, 'a')
'abc'.gsub(/a+/, 'd')
'abc'.tr('b', 'd')
'a b c'.delete(' ')
Severity
Category
Status
Source
Language