🐕 Keela v0.4.1 - "Fewer False Alarms"
The one where Keela stopped barking at shadows.
🔑 Hash Rockets & Rescue Splats
Keela was flagging constants as unused even when they appeared as hash keys:
{ SUCCESS => "ok", FAILURE => "nope" }Or in rescue splats:
rescue *RECOVERABLE_ERRORS => eShe saw SUCCESS => but the => was confusing her — she thought it was an assignment, not a usage. Fixed. Now hash rockets and rescue splats count. (#63)
🏷️ Symbol References
Rails callbacks, send, validators — they all use symbols:
before_action :authenticate_user
validate :custom_validation
send(:dynamic_method)Keela was missing these because she only looked for authenticate_user being called, not referenced. Now :method_name counts as usage. (#67)
🌍 I18n Pluralization
You call t('items.count', count: 5) and Rails magically picks items.count.other. But Keela didn't know about this magic — she'd flag items.count.one, items.count.other, and items.count.zero as unused.
Now she understands pluralization siblings. If you use the parent key with count:, the children are safe. (#69)
🔍 I18n Lazy Lookup
In a view at app/views/users/show.html.erb, you write:
<%%= t('.title') %%>Rails resolves this to users.show.title. Keela now does too. No more false positives on lazy lookups. (#71)
Upgrade
gem install keela
# or
bundle update keelaFull Changelog
Four fixes, way fewer false positives. Good girl. 🦴