Skip to content

Main content

Option Value Arity Audit

Audit explicitly supplied value counts for each option occurrence against an inclusive arity range; no greedy token assignment.

Loading tool…

Description

Audit explicitly supplied value counts for each option occurrence against an inclusive arity range; no greedy token assignment.

An argv vector already consists of literal argument strings. Shell quoting and tokenization happen before this representation; joining argv elements with spaces does not reconstruct a safe command string. Option aliases, duplicates, arity and dependencies are application policies that these tools take explicitly.

Audit explicitly supplied value counts for each option occurrence against an inclusive arity range; no greedy token assignment.

When to use this tool

Use this tool to audit explicitly supplied value counts for each option occurrence against an inclusive arity range; no greedy token assignment.

How to use the tool and how it works

  1. Enter counts, minimum, maximum using the input definitions below.
  2. Run the operation. Resolve malformed-input errors before interpreting the result.
  3. Read result.violations. Interpret signs, units, ordering and null values using the rules below.

Validate integer minimum/maximum with 0≤minimum≤maximum≤128 and each count in 0–128. Return occurrence indexes whose supplied value count lies outside the inclusive bounds.1

Input fieldMeaning and unitsAccepted input
countsExplicit value counts per option occurrence, integers 0–128.Dense list of at most 128 finite numbers, subject to the stated integer/shape rules.
minimumInclusive minimum arity, integer 0–128.Finite safe integer satisfying the stated bounds.
maximumInclusive maximum arity, integer minimum–128.Finite safe integer satisfying the stated bounds.
Output fieldInterpretation
resultObject containing the fields below.
result.violationsSource-indexed arity/group violations or missing dependency records, as specified above.
json
{
  "input": {
    "counts": [
      0,
      1,
      2
    ],
    "minimum": 1,
    "maximum": 1
  },
  "output": {
    "result": {
      "violations": [
        {
          "index": 0,
          "count": 0
        },
        {
          "index": 2,
          "count": 2
        }
      ]
    }
  }
}

Limitations and assumptions

  • No argv tokens are assigned to options; the counts must already describe option occurrences.
  • Inputs are literal tokens or explicit records. The restricted long-name grammar is [A-Za-z0-9][A-Za-z0-9-]* where required. No universal option syntax, shell semantics or process execution is inferred.
  • Every declared top-level input is required and unknown fields are rejected. Ordinary strings are limited to 8,192 UTF-16 code units and lists to 128 entries, with tighter operation-specific bounds where stated. JSON text has bounded nesting and node counts.
  • Numeric outputs must be finite and within the absolute safe-integer magnitude; exact larger integers use decimal text. Source positions are zero-based UTF-16 offsets and span ends are exclusive unless a different convention is explicitly stated.

Alternative or Complementary methods

Use the application’s option schema to choose arity, aliases and conflict policy. Pass a literal argv vector to the intended process interface; shell command construction requires separate quoting rules.

References

  1. Tool behavior and example: Option Value Arity Audit — tool.io

Similar or alternative tools

  • Short Option Attached Value Splitter

    Split an explicit short-option attached-value token after its one ASCII option letter; no equals stripping or option-schema inference.

  • Long Option Assignment Joiner

    Format one literal long-option argv token under a restricted ASCII option-name grammar; returns one argument, not shell quoting.