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
Numeric CLI flags accept partial values such as 1e4 and 500ms #176
The numeric flags on afdocs check are parsed with parseInt, which reads only the leading digits of the argument and ignores the rest. A value that is not a plain integer is silently turned into a different number instead of being rejected:
Input
Parsed as
--request-delay 500ms
500
--request-delay 1e3
1
--max-concurrency 2.5
2
--pass-threshold 50k
50
The parsed value then passes validation, so the run proceeds with a setting the user did not ask for. The same values in a config file are rejected by the config loader, so the CLI and the config file disagree.
--request-timeout already parses the whole value (fixed in #175). The remaining affected flags are:
Expected: each flag parses the whole argument, so non-integer or non-numeric input fails with the existing validation error. This is a behavior change for anyone passing a value with a trailing unit or a decimal today, so it should be called out in the release notes.
Activity