Loading
Remove unused EE::UserPreference#no_eligible_duo_add_on_assignments?
Summary
Removes the unused method EE::UserPreference#no_eligible_duo_add_on_assignments? from ee/app/models/ee/user_preference.rb.
Related to #542966 (closed)
Verification
This method was verified as unused by:
-
keela --type methodsflagged it as unused - Grep search found no callers (across
.rb,.haml,.erb); only its owndef, with the only references living in a spec-onlydescribeblock - No metaprogramming patterns reference it (no
:no_eligible_duo_add_on_assignments?,send) - Not a Rails convention method
- Not a callback
Cascade Removals
None - this was a standalone removal. The callee eligible_duo_add_on_assignments remains in use by distinct_eligible_duo_add_on_assignments and check_seat_for_default_duo_assigment.
Metrics
Source File Complexity (flog)
| Metric | Before | After | Improvement |
|---|---|---|---|
| File flog total | 215.4 | 212.8 | -2.6 (1.2%) |
| Method flog score | 2.6 | N/A | -2.6 removed |
Spec File Complexity (flog)
| Metric | Before | After | Improvement |
|---|---|---|---|
| Spec file flog total | 1779.8 | 1728.1 | -51.7 (2.9%) |
| Spec block flog score | 51.7 | N/A | -51.7 removed |
Combined Flog Summary
| File | Flog Removed |
|---|---|
ee/app/models/ee/user_preference.rb |
2.6 |
ee/spec/models/user_preference_spec.rb |
51.7 |
| Total | 2.6 + 51.7 = 54.3 |
Test Suite Impact
- Specs removed: 3 examples
- Spec file:
ee/spec/models/user_preference_spec.rb - Time saved per run: 0.11583 seconds
Estimated CI Savings
| Estimate | Pipelines/Month | Time Saved | Cost Saved/Month | Cost Saved/Year |
|---|---|---|---|---|
| Pessimistic | 15,000 | 0.48 hrs/month | $0.87 | $10.42 |
| Moderate | 30,000 | 0.97 hrs/month | $1.74 | $20.85 |
| Optimistic | 50,000 | 1.61 hrs/month | $2.90 | $34.75 |
Based on 0.11583 seconds saved per pipeline × $0.03/minute (large runners: 3x cost factor on $10/1000 base minutes)
Files Modified
ee/app/models/ee/user_preference.rb(method removed - 4 lines)ee/spec/models/user_preference_spec.rb(specs removed - 32 lines, 3 examples)scripts/lint/keela_baseline.yml(entry removed - 1 line)
Related
- Related to #542966 (closed) (Improve unused helper methods workflow)
- Part of dead code cleanup effort
- Method was listed in
scripts/lint/keela_baseline.yml