Skip to content

[deep-report] Consolidate --no-security-scanner style CLI flag duplication into pkg/cli/flags.go helpers #48673

Description

@github-actions

Description

pkg/cli/flags.go exists specifically to centralize flag registration, yet the --no-security-scanner/--disable-security-scanner deprecated-alias pattern was copy-pasted independently into 5 command files (add_command.go, add_wizard_command.go, deploy_command.go, trial_command.go, update_command.go) — ~20 lines of near-identical registration/deprecation/fallback logic plus 5 near-duplicate unit tests. A smaller-scale duplicate exists for --force-delete-host-repo-before to --delete-host-repo-before and --disable-release-bump to --no-release-bump. One test (update_command_test.go's HasDisableSecurityScannerFlag) has already drifted from the naming convention used by the other four (DeprecatesDisableSecurityScannerFlag), showing the duplication is already causing inconsistency.

Expected Impact

Add addSecurityScannerFlag(cmd) and a generic resolveDeprecatedBoolFlag(cmd, newName, oldName string) bool to pkg/cli/flags.go, then migrate all 5 commands to use them. Consolidates ~20 lines of duplicated logic and tests into one authoritative implementation, preventing future drift when the alias/help text changes.

Suggested Agent

Code Quality agent (or the repository-quality workflow that originally surfaced this).

Estimated Effort

Medium (1-4 hours)

Data Source

DeepReport Intelligence Briefing analysis, 2026-07-28. Source: Repository Quality Improvement Report #48629 (07-28).

Generated by 🔬 Deep Report · age00 · 176.7 AIC · ⌖ 13.2 AIC · ⊞ 10.5K ·

  • expires on Jul 30, 2026, 7:41 AM UTC-08:00

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions