You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Hold an Unlisted CLI That Needs an Argument to Refusing the Unknown Flag Itself #2948
gateA rule with no mechanical check, or a check that misses a shapeintroducedReview finding classed introduced per local-strict-review Disposing of Findings
After #2944 the CLI usage gate (tests/test_cli_usage.py) holds a script that needs a subcommand or positional arguments to a refusal of --bogus-flag only where the script is listed in BEFORE_FLAG, which supplies arguments that satisfy its parser. A new script that needs an argument and is not listed is held only to a non-zero exit with no effect, so one that merely warns on the flag and then stops on the missing argument passes.
A word list over the output does not close this: the repository's own missing-argument refusals use wording such as "No command given (expected apply or check)" and "--repo needs a path", and a list of such phrases only grows. One direction that would close it structurally: a declared field, for example a per-script marker that the script takes no required argument, would let the gate refuse an entry point that is neither listed in BEFORE_FLAG nor marked. Running each unlisted entry point with no arguments to find out is not safe, since an unlisted script's default mode may do real work. Comparing the output for two different unknown flags does not separate the cases either, since a warning names whichever flag it was given.
Found by the local review pass on #2944, whose docstring states this limit.
gateA rule with no mechanical check, or a check that misses a shapeintroducedReview finding classed introduced per local-strict-review Disposing of Findings
Activity
Drop the Missing-Argument Word List and State the Gate's Limit
Tighten the CLI Usage Gate, Share Its Status Parser, and Fix the Wind…