fix: restore v run _check.vsh to green (prefix unused params with _)#5
Open
MartenH wants to merge 1 commit into
Open
fix: restore v run _check.vsh to green (prefix unused params with _)#5MartenH wants to merge 1 commit into
MartenH wants to merge 1 commit into
Conversation
The verify workflow (.agent/workflows/verify.md -> v run _check.vsh) runs the example checks with `v -check -N`, which promotes 'unused parameter' notices to hard errors. On a current V that fails on 15 pre-existing sites, so _check.vsh is red even on a clean tree. Prefix the genuinely-unused parameters with `_` (the V idiom). No behavioural change: - accessibility/backend_stub.v: the stub backend is a no-op on unsupported platforms, so all of its interface params are unused by design. - accessibility/backend_linux.v: only `cursor_line` is unused (the others drive atk). - glyph_atlas.v: load_stroked_glyph's `stroke_radius` is unused (the radius is set on the FT_Stroker). - examples/showcase.v, examples/accessibility_check.v: unused callback params. After: `v -check -N examples/*.v` reports 0 unused-parameter errors, `v test .` 12/12, `v check-md .` clean.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The verify workflow —
.agent/workflows/verify.md→v run _check.vsh— runs the example checks withv -check -N, and-Npromotesunused parameternotices to hard errors. On a current V there are 15 pre-existing unused-parameter sites, so_check.vshfails on a clean checkout:This prefixes the genuinely-unused parameters with
_(the V idiom for "intentionally unused"). No behavioural change — purely parameter renames:accessibility/backend_stub.v(9) — the stub backend is the no-op implementation selected on platforms without native accessibility, so every interface parameter is unused by design.accessibility/backend_linux.v(1) — onlycursor_lineis unused;node_id/value/selected_rangestill drive the atk calls.glyph_atlas.v(1) —load_stroked_glyph'sstroke_radiusis unused (the stroke radius is configured on theFT_Stroker, not read here).examples/showcase.v(3) +examples/accessibility_check.v(1) — unused callback/section parameters.After this change:
v -check -N examples/*.v→ 0 unused-parameter errors (was 11 under-N)v test .→ 12/12 passv check-md .→ cleanSo
v run _check.vshgoes green again on a current V.