Loading
Remove unused method Project#issue_exists?
Summary
Removes the unused method Project#issue_exists? from app/models/project.rb.
Related to #542966
Verification
This method was verified as unused by:
-
keela --type methodsflagged it as unused - Grep search found no callers
- No metaprogramming patterns reference it
- Not a Rails convention method
- Not a callback
Cascade Removals
None - this was a standalone removal. The method it wrapped, get_issue, is still used elsewhere and was left intact.
Metrics
Source File Complexity (flog)
| Metric | Before | After | Improvement |
|---|---|---|---|
| File flog total | 4683.4 | 4682.3 | -1.1 (0.02%) |
| Method flog score | 1.1 | N/A | -1.1 removed |
Spec File Complexity (flog)
| Metric | Before | After | Improvement |
|---|---|---|---|
| Spec file flog total | 27639.8 | 27594.7 | -45.1 (0.16%) |
| Spec block flog score | 45.0 | N/A | -45.0 removed |
Combined Flog Summary
| File | Flog Removed |
|---|---|
app/models/project.rb |
1.1 |
spec/models/project_spec.rb |
45.0 |
| Total | 46.1 |
Test Suite Impact
- Specs removed: 2 examples
- Spec file:
spec/models/project_spec.rb - Time saved per run: 0.04 seconds
Estimated CI Savings
| Estimate | Pipelines/Month | Time Saved | Cost Saved/Month | Cost Saved/Year |
|---|---|---|---|---|
| Pessimistic | 15,000 | 0.17 hrs/month | $0.30 | $3.60 |
| Moderate | 30,000 | 0.33 hrs/month | $0.60 | $7.20 |
| Optimistic | 50,000 | 0.56 hrs/month | $1.00 | $12.00 |
Based on 0.04 seconds saved per pipeline × $0.03/minute (large runners: 3x cost factor on $10/1000 base minutes)
Files Modified
app/models/project.rb(method removed - 4 lines)spec/models/project_spec.rb(specs removed - 14 lines, 2 examples)scripts/lint/potential_methods_to_remove.yml(entry removed - 1 line)scripts/lint/keela_baseline.yml(entry removed - 1 line)
Related
- Related to #542966 (Improve unused helper methods workflow)
- Part of dead code cleanup effort
- Method was listed in
scripts/lint/potential_methods_to_remove.ymlandscripts/lint/keela_baseline.yml