Remove unused scope GpgKey.externally_invalid

Summary

Removes the unused scope GpgKey.externally_invalid from app/models/gpg_key.rb.

Related to #542966

Verification

This scope was verified as unused by:

  • Keela linter flagged it as unused in the fresh baseline
  • Grep search found no callers (only the definition itself)
  • No metaprogramming patterns reference it (:externally_invalid, send, etc.)
  • Not used in scope chaining or merge() calls
  • Not a Rails convention scope

Cascade Removals

None - this was a standalone removal.

Note: The sister scope externally_valid IS used (in app/helpers/projects_helper.rb) and was NOT removed.

Metrics

Source File Complexity (flog)

Metric Before After Improvement
File flog total 105.1 102.4 -2.7 (2.6%)
Scope flog score ~2.7 N/A -2.7 removed

Spec File Complexity (flog)

Metric Before After Improvement
Spec file flog total N/A N/A No change
Spec block flog score N/A N/A No specs existed for this scope

Combined Flog Summary

File Flog Removed
app/models/gpg_key.rb 2.7
spec/models/gpg_key_spec.rb 0 (no specs for this scope)
Total 2.7

Test Suite Impact

  • Specs removed: 0 examples (no specs existed for this scope)
  • Spec file: spec/models/gpg_key_spec.rb (unchanged)
  • Time saved per run: 0 seconds (no specs to remove)

Estimated CI Savings

Estimate Pipelines/Month Time Saved Cost Saved/Month Cost Saved/Year
Pessimistic 15,000 0 hrs/month $0.00 $0.00
Moderate 30,000 0 hrs/month $0.00 $0.00
Optimistic 50,000 0 hrs/month $0.00 $0.00

No spec time savings as there were no specs for this scope.

Files Modified

  • app/models/gpg_key.rb (scope removed - 1 line)
  • scripts/lint/keela_baseline.yml (entry removed - 2 lines)
  • Related to #542966 (Dead code cleanup initiative)
  • Part of dead code cleanup effort
  • Scope was listed in scripts/lint/keela_baseline.yml under scopes

Merge request reports

Loading
Loading