Remove unused method Namespace#any_project_with_pages_deployed?

Summary

Removes the unused method Namespace#any_project_with_pages_deployed? from app/models/namespace.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 in app/, lib/, ee/app/, ee/lib/
  • No metaprogramming patterns reference it (no :any_project_with_pages_deployed, send, or delegate)
  • Not a Rails convention method
  • Not a callback and not referenced in any view

Cascade Removals

None - this was a standalone removal.

Metrics

Source File Complexity (flog)

Metric Before After Improvement
File flog total 1179.2 1175.3 -3.9 (0.3%)
Method flog score 3.9 N/A -3.9 removed

Spec File Complexity (flog)

Metric Before After Improvement
Spec file flog total 10364.1 10322.6 -41.5 (0.4%)
Spec block flog score 41.5 N/A -41.5 removed

Combined Flog Summary

File Flog Removed
app/models/namespace.rb 3.9
spec/models/namespace_spec.rb 41.5
Total 45.4

Test Suite Impact

  • Specs removed: 1 example
  • Spec file: spec/models/namespace_spec.rb
  • Time saved per run: 2.04 seconds

Estimated CI Savings

Estimate Pipelines/Month Time Saved Cost Saved/Month Cost Saved/Year
Pessimistic 15,000 8.50 hrs/month $15.30 $183.60
Moderate 30,000 17.00 hrs/month $30.60 $367.20
Optimistic 50,000 28.33 hrs/month $51.00 $612.00

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

Files Modified

  • app/models/namespace.rb (method removed - 3 lines)
  • spec/models/namespace_spec.rb (specs removed - 20 lines, 1 example)
  • 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