Remove unused method AvatarsHelper#avatar_without_link

Summary

Removes the unused method AvatarsHelper#avatar_without_link from app/helpers/avatars_helper.rb.

Related to #542966 (closed)

Verification

This method was verified as unused by:

  • keela --type methods flagged it as unused
  • Grep search found no callers (searched .rb/.haml/.erb/.js/.vue; only its own def matched)
  • No metaprogramming patterns reference it (no :avatar_without_link symbol, no send)
  • Not a Rails convention method
  • Not a callback

The sibling user_avatar_without_link is a distinct method (confirmed via word-boundary grep) and is unaffected. The only coverage was a spec-only describe '#avatar_without_link' block.

Cascade Removals

None - this was a standalone removal. The method's callees (user_avatar_without_link and Pajamas::AvatarComponent) remain in use elsewhere.

Metrics

Source File Complexity (flog)

Metric Before After Improvement
File flog total 150.2 142.3 -7.9 (5.3%)
Method flog score 7.9 N/A -7.9 removed

Spec File Complexity (flog)

Metric Before After Improvement
Spec file flog total 1118.9 1063.2 -55.7 (5.0%)
Spec block flog score 55.7 N/A -55.7 removed

Combined Flog Summary

File Flog Removed
app/helpers/avatars_helper.rb 7.9
spec/helpers/avatars_helper_spec.rb 55.7
Total 63.6

Test Suite Impact

  • Specs removed: 2 examples
  • Spec file: spec/helpers/avatars_helper_spec.rb
  • Time saved per run: 0.05551 seconds

Estimated CI Savings

Estimate Pipelines/Month Time Saved Cost Saved/Month Cost Saved/Year
Pessimistic 15,000 0.23 hrs/month $0.42 $4.99
Moderate 30,000 0.46 hrs/month $0.83 $9.99
Optimistic 50,000 0.77 hrs/month $1.39 $16.65

Based on 0.05551 seconds saved per pipeline × $0.03/minute (large runners: 3x cost factor on $10/1000 base minutes)

Files Modified

  • app/helpers/avatars_helper.rb (method removed - 9 lines)
  • spec/helpers/avatars_helper_spec.rb (specs removed - 43 lines, 2 examples)
  • scripts/lint/keela_baseline.yml (entry removed - 1 line)
  • Related to #542966 (closed) (Improve unused helper methods workflow)
  • Part of dead code cleanup effort
  • Method was listed in scripts/lint/keela_baseline.yml

Merge request reports

Loading
Loading