2.0 KiB
Experimental multi-rule line correction
Start the bridge with --experimental-multi-rule-line-fix to add one action
for all distinct fixable VSG rules reported on a diagnosed line. Individual
rule fixes are controlled separately by --experimental-rule-fix; enable both
flags to offer both kinds of correction. The bridge submits every selector to
one VSG process so VSG retains control of phase ordering; it never loops over
stale line numbers.
Opening the action menu does not invoke VSG. The grouped process starts only after the user selects the experimental action.
This action is intentionally disabled by default. Rules from an early phase can
insert or delete lines before later rules inspect their selector. In the
one-line-entity.vhd showcase, the phase-one newline correction makes progress
but exposes an entity_009 indentation finding, while the original phase-six
end-name selector moves to line 2. A second request using the old line-1
selectors is a no-op. This named regression is asserted by the packaged-VSG
integration test rather than silently treated as a complete correction.
The normal suite includes a fixed-seed (0x5eed) 128-case structured edit
property test covering indentation, whitespace, line insertion, casing,
Unicode, LF, and CRLF. It also verifies selector deduplication, one-process
batching, no-op behavior, stale-version rejection, cancellation, and exact LSP
edit reproduction. The opt-in packaged-VSG test diagnoses the corrected output
again and checks monotonic progress for the showcase case:
VSG_EXECUTABLE=/path/to/venv/bin/vsg \
cargo test --test packaged_vsg -- --ignored
The gate must remain until every fixable rule family and phase has a curated case, known line-shift regressions are resolved or explicitly accepted, a longer fuzz campaign has no unexplained regression, the packaged release pair passes, and the behavior has been manually verified in Helix. Current tests are useful safety coverage, not promotion evidence for enabling the action by default.