Skip to content

fix: restore v run _check.vsh to green (prefix unused params with _)#5

Open
MartenH wants to merge 1 commit into
vlang:mainfrom
MartenH:fix/restore-check-green
Open

fix: restore v run _check.vsh to green (prefix unused params with _)#5
MartenH wants to merge 1 commit into
vlang:mainfrom
MartenH:fix/restore-check-green

Conversation

@MartenH

@MartenH MartenH commented Jun 9, 2026

Copy link
Copy Markdown

The verify workflow — .agent/workflows/verify.mdv run _check.vsh — runs the example checks with v -check -N, and -N promotes unused parameter notices to hard errors. On a current V there are 15 pre-existing unused-parameter sites, so _check.vsh fails on a clean checkout:

accessibility/backend_stub.v:8:49: error: unused parameter: `nodes`
...
glyph_atlas.v:369:2: error: unused parameter: `stroke_radius`
examples/showcase.v:643:48: error: unused parameter: `width`

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) — only cursor_line is unused; node_id/value/selected_range still drive the atk calls.
  • glyph_atlas.v (1) — load_stroked_glyph's stroke_radius is unused (the stroke radius is configured on the FT_Stroker, not read here).
  • examples/showcase.v (3) + examples/accessibility_check.v (1) — unused callback/section parameters.

After this change:

  • v -check -N examples/*.v0 unused-parameter errors (was 11 under -N)
  • v test .12/12 pass
  • v check-md . → clean

So v run _check.vsh goes green again on a current V.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant